public class NuxeoException extends RuntimeException
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; }
Constructor and Description |
---|
NuxeoException() |
NuxeoException(String message) |
NuxeoException(String message,
Throwable cause) |
NuxeoException(Throwable cause) |
Modifier and Type | Method and Description |
---|---|
void |
addInfo(String info)
Adds information to this exception, to be returned with the message.
|
List<String> |
getInfos()
Gets the information added to this exception.
|
String |
getMessage() |
String |
getOriginalMessage()
Gets the original message passed to the constructor, without additional information added.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public NuxeoException()
public NuxeoException(String message)
public NuxeoException(String message, Throwable cause)
public NuxeoException(Throwable cause)
public void addInfo(String info)
info
- the informationpublic List<String> getInfos()
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.
public String getOriginalMessage()
public String getMessage()
getMessage
in class Throwable
Copyright © 2015 Nuxeo SA. All rights reserved.