Class 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

public class NuxeoException extends RuntimeException
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 Details

    • statusCode

      protected int statusCode
  • Constructor Details

    • NuxeoException

      public NuxeoException()
    • NuxeoException

      public NuxeoException(int statusCode)
      Since:
      9.3
    • NuxeoException

      public NuxeoException(String message)
    • NuxeoException

      public NuxeoException(String message, int statusCode)
      Since:
      9.3
    • NuxeoException

      public NuxeoException(String message, Throwable cause)
    • NuxeoException

      public NuxeoException(String message, Throwable cause, int statusCode)
      Since:
      9.3
    • NuxeoException

      public NuxeoException(Throwable cause)
    • NuxeoException

      public NuxeoException(Throwable cause, int statusCode)
      Since:
      9.3
  • Method Details

    • addInfo

      public NuxeoException addInfo(String info)
      Adds information to this exception, to be returned with the message.
      Parameters:
      info - the information
      Since:
      7.4
    • getInfos

      public List<String> 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

      public String getOriginalMessage()
      Gets the original message passed to the constructor, without additional information added.
      Since:
      7.4
    • getMessage

      public String getMessage()
      Overrides:
      getMessage in class Throwable
    • getStatusCode

      public int getStatusCode()
      Gets the HTTP status code mapped to this exception.
      Since:
      9.3