|
|||||||||
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.LocatorException
public class LocatorException
A LocatorException
is thrown when a Locator
request fails.
Contained are the reasons for the request failure. If there is a problem with the transport, the
HTTP error code can be attained (see LocatorException.getHTTPCode()
), but may be -1
if no
HTTP connection was established.
Field Summary | ||
---|---|---|
static int |
AMBIGUOUS_ADDRESS
The address results in mutiple choices. |
|
static int |
CITY_AMBIGUOUS_PLEASE_SPECIFY_STATE
The request was invalid because the city was considered to be ambiguous and needs to have the state/province specified. |
|
static int |
CITY_COUNTRY_MISMATCH
City mismatches the country. |
|
static int |
CITY_NOT_FOUND
City was not found. |
|
static int |
CITY_NOT_SPECIFIED
The city was not specified and must be in the request. |
|
static int |
CITY_POSTAL_CODE_MISMATCH
Postal code matches country and state but mismatches the postal code set for the city. |
|
static int |
CITY_STATE_MISMATCH
City did not match the state. |
|
static int |
COUNTRY_POSTAL_CODE_MISMATCH
Country mismatches the postal code. |
|
static int |
DATA_UNAVAILABLE
Address is out of data coverage. |
|
static int |
DATA_UNAVAILABLE_FOR_SPECIFIED_ADMIN_LEVEL
The bounding box data for the specified admin level in that region is unavailable. |
|
static int |
INVALID_ADDRESS_NUMBER
The address number was invalid because it was a negative number, 6+ digit number, or unrecognizable. |
|
static int |
INVALID_ADMIN_LEVEL
The admin level specified in the Reverse Geocoding with bounding box request is unknown to the server.. |
|
static int |
INVALID_COORDINATE
The provided lat/lon coordinate is invalid. |
|
static int |
INVALID_COUNTRY
The submitted country was invalid. |
|
static int |
INVALID_POSTAL_CODE
The postal code is invalid. |
|
static int |
INVALID_REQUEST
The request was invalid due to, but not limited to: request is empty, incomplete data, or failed to decode request message. |
|
static int |
INVALID_STATE
The submitted state/province was invalid. |
|
static int |
INVALID_STATE_AND_COUNTRY
Both the submitted state/province and country were invalid. |
|
static int |
ITEM_NOT_FOUND
When an item is not found, it can include the city, street, address. |
|
static int |
MALFORMED_INTERSECTION_ADDRESS
The request failed because the intersection address was malformed. |
|
static int |
MAX_LIMIT_EXCEEDED
The max number of requets/batch is exceeded. |
|
static int |
REDIRECT
This address is in a restricted region. |
|
static int |
SERVER_BUSY
Server is currently busy so it cannot fulfill client's request. |
|
static int |
SERVER_INTERNAL_ERROR
A server internal error. |
|
static int |
SPECIFY_CITY
The request requires city to be specified. |
|
static int |
SPECIFY_COUNTRY
The request requires country to be specified. |
|
static int |
SPECIFY_STATE_PROVINCE
The request requires state/province to be specified. |
|
static int |
STATE_POSTAL_CODE_MISMATCH
Postal code matches country but does not match the state. |
|
static int |
TOO_MANY_ITEMS
The server got too many returned items from the query that it could not effectively perform a sort to get the first twenty. |
|
static int |
UNSUPPORTED_ADDRESS_TYPE
Unsupported address type means that only numeric address types are supported. |
|
static int |
UNSUPPORTED_CHARACTER
The request contained unsupported characters, including any wildcards in the search request. |
Constructor Summary | ||
---|---|---|
LocatorException(int errorCode)
Constructor. |
||
LocatorException(int errorCode,
String message,
int httpCode)
Constructor. |
Method Summary | ||
---|---|---|
int |
getErrorCode()
Returns the error code for a failed geocoding request. |
|
int |
getHTTPCode()
Returns the request's HTTP error code, as defined by HTTP_* in
javax.microedition.io.HttpConnection . |
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 INVALID_REQUEST
public static final int SERVER_INTERNAL_ERROR
public static final int UNSUPPORTED_ADDRESS_TYPE
public static final int INVALID_ADDRESS_NUMBER
public static final int ITEM_NOT_FOUND
public static final int TOO_MANY_ITEMS
public static final int UNSUPPORTED_CHARACTER
public static final int INVALID_STATE
public static final int INVALID_COUNTRY
public static final int INVALID_STATE_AND_COUNTRY
public static final int CITY_NOT_FOUND
public static final int CITY_STATE_MISMATCH
public static final int CITY_AMBIGUOUS_PLEASE_SPECIFY_STATE
public static final int MALFORMED_INTERSECTION_ADDRESS
public static final int CITY_NOT_SPECIFIED
public static final int SPECIFY_CITY
public static final int SPECIFY_STATE_PROVINCE
public static final int SPECIFY_COUNTRY
public static final int INVALID_POSTAL_CODE
public static final int CITY_POSTAL_CODE_MISMATCH
public static final int STATE_POSTAL_CODE_MISMATCH
public static final int REDIRECT
public static final int AMBIGUOUS_ADDRESS
public static final int MAX_LIMIT_EXCEEDED
public static final int INVALID_COORDINATE
public static final int INVALID_ADMIN_LEVEL
public static final int DATA_UNAVAILABLE_FOR_SPECIFIED_ADMIN_LEVEL
public static final int DATA_UNAVAILABLE
public static final int SERVER_BUSY
public static final int COUNTRY_POSTAL_CODE_MISMATCH
public static final int CITY_COUNTRY_MISMATCH
Constructor Detail |
---|
public LocatorException(int errorCode, String message, int httpCode)
errorCode
- the error code as defined in Locator
message
- optional message relating to request failure. May be null.httpCode
- the HTTP code from the server request, as defined by HTTP_*
in
javax.microedition.io.HttpConnection
. Can be -1
if unknown.public LocatorException(int errorCode)
errorCode
- the error code as defined in Locator
Method Detail |
---|
public int getErrorCode()
public int getHTTPCode()
HTTP_*
in
javax.microedition.io.HttpConnection
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.