Package org.nuxeo.ecm.core.api
Class NuxeoException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.nuxeo.ecm.core.api.NuxeoException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AbstractBindingResolver.NoValueToAddInContext
,AbstractBindingResolver.ValueNotFound
,AuditQueryException
,BinaryMetadataException
,CommentNotFoundException
,CommentSecurityException
,ConcurrentUpdateException
,ConversionException
,DirectoryException
,DocumentExistsException
,DocumentNotFoundException
,DocumentRouteException
,DocumentSecurityException
,DocumentValidationException
,GroupAlreadyExistsException
,IllegalParameterException
,InvalidPasswordException
,InvalidSearchParameterException
,LifeCycleException
,LockException
,MailException
,MarshallingException
,MaximumTransientSpaceExceeded
,MimetypeDetectionException
,MimetypeNotFoundException
,NuxeoDriveContribException
,PreviewException
,PropertyException
,QueryParseException
,RecoverableClientException
,RelationAlreadyExistsException
,RootlessItemException
,SignException
,TokenAuthenticationException
,TooManyChangesException
,UserAlreadyExistsException
,UserRegistrationException
,VersionNotModifiableException
,WebDeployException
,WebResourceNotFoundException
,WebSecurityException
,XMLTemplateSerializer.TemplateInputBadFormat
The most generic exception thrown by the Nuxeo.
It can be used to provide enriched information on the exception catch path, without re-wrapping:
try { doSomething(id); } catch (NuxeoException e) { e.addInfo("Failed to do something with document id: " + id); throw e; }
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionNuxeoException
(int statusCode) NuxeoException
(String message) NuxeoException
(String message, int statusCode) NuxeoException
(String message, Throwable cause) NuxeoException
(String message, Throwable cause, int statusCode) NuxeoException
(Throwable cause) NuxeoException
(Throwable cause, int statusCode) -
Method Summary
Modifier and TypeMethodDescriptionAdds information to this exception, to be returned with the message.getInfos()
Gets the information added to this exception.Gets the original message passed to the constructor, without additional information added.int
Gets the HTTP status code mapped to this exception.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
statusCode
protected int statusCode
-
-
Constructor Details
-
NuxeoException
public NuxeoException() -
NuxeoException
public NuxeoException(int statusCode) - Since:
- 9.3
-
NuxeoException
-
NuxeoException
- Since:
- 9.3
-
NuxeoException
-
NuxeoException
- Since:
- 9.3
-
NuxeoException
-
NuxeoException
- Since:
- 9.3
-
-
Method Details
-
addInfo
Adds information to this exception, to be returned with the message.- Parameters:
info
- the information- Since:
- 7.4
-
getInfos
Gets the information added to this exception.The list is returned in the reverse order than that of the calls to
addInfo(java.lang.String)
, i.e., the last added information is first in the list.- Returns:
- the information list
- Since:
- 7.4
-
getOriginalMessage
Gets the original message passed to the constructor, without additional information added.- Since:
- 7.4
-
getMessage
- Overrides:
getMessage
in classThrowable
-
getStatusCode
public int getStatusCode()Gets the HTTP status code mapped to this exception.- Since:
- 9.3
-