Package org.onebusaway.exceptions

Examples of org.onebusaway.exceptions.InvalidArgumentServiceException


    SearchResult<AgencyAndId> stops;
    try {
      stops = _searchService.searchForStopsByCode(query, 10, MIN_SCORE);
    } catch (ParseException e) {
      throw new InvalidArgumentServiceException("query", "queryParseError");
    } catch (IOException e) {
      _log.error("error executing stop search: query=" + query, e);
      e.printStackTrace();
      throw new ServiceException();
    }
View Full Code Here


      return _searchService.searchForRoutesByName(query.getQuery(),
          query.getMaxCount() + 1, query.getMinScoreToKeep());
    } catch (IOException e) {
      throw new ServiceException();
    } catch (ParseException e) {
      throw new InvalidArgumentServiceException("query", "queryParseError");
    }
  }
View Full Code Here

   */
  public static String getAgencyIdFromEntityId(String entityId)
      throws InvalidArgumentServiceException {
    int index = entityId.indexOf('_');
    if (index == -1)
      throw new InvalidArgumentServiceException("entityId", "badEntityId");
    return entityId.substring(0, index);
  }
View Full Code Here

    if (data == null)
      return new JSONObject();
    try {
      return new JSONObject(data);
    } catch (JSONException e) {
      throw new InvalidArgumentServiceException("data", e.getMessage());
    }
  }
View Full Code Here

      if (data.has("badge"))
        b.badge(data.getInt("badge"));
      if (data.has("sound"))
        b.sound(data.getString("sound"));
    } catch (JSONException e) {
      throw new InvalidArgumentServiceException("data", e.getMessage());
    }

    return b.build();
  }
View Full Code Here

    try {
      if (data.has("production"))
        return data.getBoolean("production");
      return false;
    } catch (JSONException e) {
      throw new InvalidArgumentServiceException("data", e.getMessage());
    }
  }
View Full Code Here

TOP

Related Classes of org.onebusaway.exceptions.InvalidArgumentServiceException

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.