Package com.cychop.til.exceptions

Examples of com.cychop.til.exceptions.DataStructureException


    // the trip ID is contained at beginning of line, between "&" and "A"
    try {
      int tripId = Integer.parseInt(line.substring(1, line.indexOf('A')));
      trip = Trip.fromId(tripId);
    } catch (NumberFormatException nfe) {
      throw new DataStructureException(
          "Could not get the trip ID; line: " + line);
    } catch (StringIndexOutOfBoundsException sie) {
      throw new DataStructureException(
          "Could not get the trip ID; line: " + line);
    }

    // initializing the trip duration
    line = line.substring(line.indexOf(" ")).trim();
View Full Code Here

TOP

Related Classes of com.cychop.til.exceptions.DataStructureException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.