|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
net.rim.device.api.lbs.travel.TravelTimeException
public class TravelTimeException
Represents an exception that is thrown when trying to retrieve a travel time estimate. The exception may be caused by network communication issues, a problem determining a route, or an incorrect use of the Travel Time API.
To allow for easy identification, routing-related errors are always an
instance of TravelTimeRouteException.
| Field Summary | ||
|---|---|---|
static int |
NO_HTTP_CODE
Indicates that no HTTP response code has been specified. |
|
static int |
REQUEST_COMMUNICATION
Indicates that an error occurred while attempting to communicate with the Travel Time server. |
|
static int |
REQUEST_COURSE_INVALID
Indicates an invalid course (also known as heading) has been specified. |
|
static int |
REQUEST_LAT_LON_INVALID
Indicates an invalid latitude or longitude has been specified. |
|
static int |
REQUEST_MAX_PENDING_EXCEEDED
Indicates the maximum number of pending estimate requests is exceeded. |
|
static int |
REQUEST_MISSING_DATA
Indicates data is missing from the estimate request. |
|
static int |
REQUEST_SPEED_INVALID
Indicates an invalid speed has been specified. |
|
static int |
REQUEST_START_TIME_INVALID
Indicates an invalid estimate start time has been specified. |
|
static int |
ROUTING_GENERAL
Indicates than an error occurred while computing a route. |
|
static int |
ROUTING_LAT_LON
Indicates that a route could not be computed based on the specified latitude and longitude. |
|
static int |
ROUTING_ROUTE_EXCEEDS_MAX
Indicates that the route exceeds the maximum allowable distance. |
|
static int |
ROUTING_ROUTE_NOT_FOUND
Indicates that a route could not be found. |
|
static int |
ROUTING_SERVICE
Indicates that the routing service is unavailable. |
|
static int |
UNSPECIFIED
Indicates an error for which no further detail is available. |
|
| Constructor Summary | ||
|---|---|---|
TravelTimeException(int errorCode,
String message)
Constructs the exception object based on the specified error code and message. |
||
TravelTimeException(int errorCode,
String message,
int httpCode)
Constructs an exception based on an HTTP error response. |
||
| Method Summary | ||
|---|---|---|
int |
getErrorCode()
Returns an error code. |
|
int |
getHttpCode()
If the exception was due to an HTTP error, this method returns the HTTP response code. |
|
| Methods inherited from class java.lang.Throwable |
|---|
getMessage, printStackTrace, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int UNSPECIFIED
public static final int REQUEST_MAX_PENDING_EXCEEDED
public static final int REQUEST_MISSING_DATA
public static final int REQUEST_LAT_LON_INVALID
public static final int REQUEST_START_TIME_INVALID
public static final int REQUEST_COURSE_INVALID
public static final int REQUEST_SPEED_INVALID
public static final int REQUEST_COMMUNICATION
public static final int ROUTING_SERVICE
public static final int ROUTING_GENERAL
public static final int ROUTING_LAT_LON
public static final int ROUTING_ROUTE_NOT_FOUND
public static final int ROUTING_ROUTE_EXCEEDS_MAX
public static final int NO_HTTP_CODE
| Constructor Detail |
|---|
public TravelTimeException(int errorCode,
String message)
errorCode - An error code defined by this class.message - A message describing the problem.
public TravelTimeException(int errorCode,
String message,
int httpCode)
errorCode - An error code defined by this class.message - A message describing the problem.httpCode - An HTTP response code defined in
HttpConnection| Method Detail |
|---|
public int getErrorCode()
public int getHttpCode()
HttpConnection. If the
exception was not caused by an HTTP error, -1 is returned.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal