Package io.lighty.codecs.xml
Class DocumentedException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- io.lighty.codecs.xml.DocumentedException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
MissingNameSpaceException
,UnexpectedElementException
,UnexpectedNamespaceException
public class DocumentedException extends Exception
Checked exception to communicate an error that needs to be sent to the netconf client.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DocumentedException.ErrorSeverity
static class
DocumentedException.ErrorTag
static class
DocumentedException.ErrorType
-
Field Summary
Fields Modifier and Type Field Description static String
ERROR_APP_TAG
static String
ERROR_INFO
static String
ERROR_MESSAGE
static String
ERROR_PATH
static String
ERROR_SEVERITY
static String
ERROR_TAG
static String
ERROR_TYPE
static String
RPC_ERROR
-
Constructor Summary
Constructors Constructor Description DocumentedException(String message)
DocumentedException(String message, DocumentedException.ErrorType errorType, DocumentedException.ErrorTag errorTag, DocumentedException.ErrorSeverity errorSeverity)
DocumentedException(String message, DocumentedException.ErrorType errorType, DocumentedException.ErrorTag errorTag, DocumentedException.ErrorSeverity errorSeverity, Map<String,String> errorInfo)
DocumentedException(String message, Exception cause)
DocumentedException(String message, Exception cause, DocumentedException.ErrorType errorType, DocumentedException.ErrorTag errorTag, DocumentedException.ErrorSeverity errorSeverity)
DocumentedException(String message, Exception cause, DocumentedException.ErrorType errorType, DocumentedException.ErrorTag errorTag, DocumentedException.ErrorSeverity errorSeverity, Map<String,String> errorInfo)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DocumentedException
fromXMLDocument(Document fromDoc)
Map<String,String>
getErrorInfo()
DocumentedException.ErrorSeverity
getErrorSeverity()
DocumentedException.ErrorTag
getErrorTag()
DocumentedException.ErrorType
getErrorType()
String
toString()
Document
toXMLDocument()
static <E extends Exception>
DocumentedExceptionwrap(E exception)
static DocumentedException
wrap(ConflictingVersionException ex)
static DocumentedException
wrap(ValidationException ex)
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
-
-
-
Field Detail
-
RPC_ERROR
public static final String RPC_ERROR
- See Also:
- Constant Field Values
-
ERROR_TYPE
public static final String ERROR_TYPE
- See Also:
- Constant Field Values
-
ERROR_TAG
public static final String ERROR_TAG
- See Also:
- Constant Field Values
-
ERROR_SEVERITY
public static final String ERROR_SEVERITY
- See Also:
- Constant Field Values
-
ERROR_APP_TAG
public static final String ERROR_APP_TAG
- See Also:
- Constant Field Values
-
ERROR_PATH
public static final String ERROR_PATH
- See Also:
- Constant Field Values
-
ERROR_MESSAGE
public static final String ERROR_MESSAGE
- See Also:
- Constant Field Values
-
ERROR_INFO
public static final String ERROR_INFO
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DocumentedException
public DocumentedException(String message)
-
DocumentedException
public DocumentedException(String message, DocumentedException.ErrorType errorType, DocumentedException.ErrorTag errorTag, DocumentedException.ErrorSeverity errorSeverity)
-
DocumentedException
public DocumentedException(String message, DocumentedException.ErrorType errorType, DocumentedException.ErrorTag errorTag, DocumentedException.ErrorSeverity errorSeverity, Map<String,String> errorInfo)
-
DocumentedException
public DocumentedException(String message, Exception cause, DocumentedException.ErrorType errorType, DocumentedException.ErrorTag errorTag, DocumentedException.ErrorSeverity errorSeverity)
-
DocumentedException
public DocumentedException(String message, Exception cause, DocumentedException.ErrorType errorType, DocumentedException.ErrorTag errorTag, DocumentedException.ErrorSeverity errorSeverity, Map<String,String> errorInfo)
-
-
Method Detail
-
wrap
public static <E extends Exception> DocumentedException wrap(E exception) throws DocumentedException
- Throws:
DocumentedException
-
wrap
public static DocumentedException wrap(ValidationException ex) throws DocumentedException
- Throws:
DocumentedException
-
wrap
public static DocumentedException wrap(ConflictingVersionException ex) throws DocumentedException
- Throws:
DocumentedException
-
fromXMLDocument
public static DocumentedException fromXMLDocument(Document fromDoc)
-
getErrorType
public DocumentedException.ErrorType getErrorType()
-
getErrorTag
public DocumentedException.ErrorTag getErrorTag()
-
getErrorSeverity
public DocumentedException.ErrorSeverity getErrorSeverity()
-
toXMLDocument
public Document toXMLDocument()
-
-