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
-
Constructor Summary
Constructors Constructor Description ApiException(String message, String code, int status)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods 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 Detail
-
code
public final String code
-
status
public final int status
-
-
Method Detail
-
fromError
public static ApiException fromError(String message, String code, int status)
-
getLocalizedMessage
public String getLocalizedMessage()
- Overrides:
getLocalizedMessagein classThrowable
-
-