Package com.google.maps.errors
Class ApiException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.google.maps.errors.ApiException
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
AccessNotConfiguredException
,InvalidRequestException
,MaxElementsExceededException
,MaxRouteLengthExceededException
,MaxWaypointsExceededException
,NotFoundException
,OverDailyLimitException
,OverQueryLimitException
,RequestDeniedException
,UnknownErrorException
,ZeroResultsException
public class ApiException extends java.lang.Exception
ApiException and its descendants represent an error returned by the remote API. API errors are determined by thestatus
field returned in any of the Geo API responses.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ApiException(java.lang.String message)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ApiException
from(java.lang.String status, java.lang.String errorMessage)
Construct the appropriate ApiException from the response.
-
-
-
Method Detail
-
from
public static ApiException from(java.lang.String status, java.lang.String errorMessage)
Construct the appropriate ApiException from the response. If the response was successful, this method will return null.- Parameters:
status
- The status field returned from the APIerrorMessage
- The error message returned from the API- Returns:
- The appropriate ApiException based on the status or null if no error occurred.
-
-