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 class
ApiException.BadRequest
static class
ApiException.Internal
static class
ApiException.NotFound
static class
ApiException.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 ApiException
fromError(String message, String code, int status)
String
getLocalizedMessage()
-
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:
getLocalizedMessage
in classThrowable
-
-