Class ApiException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.springframework.extensions.surf.exception.PlatformRuntimeException
-
- org.alfresco.rest.framework.core.exceptions.ApiException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ArchivedContentException
,ConstraintViolatedException
,DisabledServiceException
,InsufficientStorageException
,InvalidArgumentException
,JsonpCallbackNotAllowedException
,NotFoundException
,PermissionDeniedException
,RequestEntityTooLargeException
,RestoreInProgressException
,ServiceUnavailableException
,StaleEntityException
,UnsupportedMediaTypeException
,UnsupportedResourceOperationException
public class ApiException extends org.springframework.extensions.surf.exception.PlatformRuntimeException
Base exception for errors in the API framework. In general, we don't want developers having to think about http status codes or rendering responses to the user. This exception hierarchy is designed to abstract the http logic away so the developer can concentrate on implementing services logic. The framework will attempt to render errors in a consistent way. Default status is STATUS_INTERNAL_SERVER_ERROR = 500.- Author:
- Gethin James
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ApiException(String msgId)
ApiException(String msgId, Object[] msgParams)
ApiException(String msgId, String message)
ApiException(String msgId, String message, Throwable cause)
ApiException(String msgId, Throwable cause)
ApiException(String msgId, Throwable cause, Map<String,Object> additionalState)
ApiException(String msgId, Map<String,Object> additionalState)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>
getAdditionalState()
A free-form object that contains any additional state that the developer thinks might be relevant for troubleshooting.String
getMsgId()
Returns the message id key.-
Methods inherited from class org.springframework.extensions.surf.exception.PlatformRuntimeException
create, create, makeRuntimeException
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Method Detail
-
getAdditionalState
public Map<String,Object> getAdditionalState()
A free-form object that contains any additional state that the developer thinks might be relevant for troubleshooting. This object will be rendered as JSON.
-
getMsgId
public String getMsgId()
Returns the message id key.- Returns:
- String messageId
-
-