Package com.softlayer.api
Class ApiException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.softlayer.api.ApiException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ApiException.BadRequest,ApiException.Internal,ApiException.NotFound,ApiException.Unauthorized
public class ApiException extends RuntimeException
Base exception for all errors that occur inside the API
- See Also:
- Serialized Form
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classApiException.BadRequeststatic classApiException.Internalstatic classApiException.NotFoundstatic classApiException.Unauthorized -
Field Summary
-
Constructor Summary
Constructors Constructor Description ApiException(String message, String code, int status) -
Method Summary
Modifier and Type Method Description static ApiExceptionfromError(String message, String code, int status)StringgetLocalizedMessage()Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
code
-
status
public final int status
-
-
Constructor Details
-
ApiException
-
-
Method Details
-
fromError
-
getLocalizedMessage
- Overrides:
getLocalizedMessagein classThrowable
-