Class RestconfDocumentedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.opendaylight.restconf.common.errors.RestconfDocumentedException
- All Implemented Interfaces:
Serializable
Unchecked exception to communicate error information, as defined
"errors" YANG Data Template.
- Author:
- Devin Avery, Thomas Pantelis
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRestconfDocumentedException(String message) Constructs an instance with an error message.RestconfDocumentedException(String message, Throwable cause) Constructs an instance with an error message and exception cause.RestconfDocumentedException(String message, Throwable cause, Collection<? extends org.opendaylight.yangtools.yang.common.RpcError> rpcErrors) Constructs an instance with the given RpcErrors.RestconfDocumentedException(String message, Throwable cause, List<RestconfError> errors) Constructs an instance with the given errors.RestconfDocumentedException(String message, org.opendaylight.yangtools.yang.common.ErrorType errorType, org.opendaylight.yangtools.yang.common.ErrorTag errorTag) Constructs an instance with an error message, error type, and error tag.RestconfDocumentedException(String message, org.opendaylight.yangtools.yang.common.ErrorType errorType, org.opendaylight.yangtools.yang.common.ErrorTag errorTag, Throwable cause) Constructs an instance with an error message, error type, error tag and exception cause.RestconfDocumentedException(String message, org.opendaylight.yangtools.yang.common.ErrorType errorType, org.opendaylight.yangtools.yang.common.ErrorTag errorTag, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier errorPath) Constructs an instance with an error message, error type, error tag and error path.RestconfDocumentedException(Throwable cause, List<RestconfError> errors) RestconfDocumentedException(Throwable cause, RestconfError error) RestconfDocumentedException(Throwable cause, RestconfError error, org.opendaylight.yangtools.yang.model.api.EffectiveModelContext modelContext) Constructs an instance with the given error. -
Method Summary
Modifier and TypeMethodDescription@Nullable org.opendaylight.yangtools.yang.model.api.EffectiveModelContextReference toEffectiveModelContextin which this exception was generated.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
RestconfDocumentedException
Constructs an instance with an error message. The error type defaults to APPLICATION and the error tag defaults to OPERATION_FAILED.- Parameters:
message- A string which provides a plain text string describing the error.
-
RestconfDocumentedException
public RestconfDocumentedException(String message, org.opendaylight.yangtools.yang.common.ErrorType errorType, org.opendaylight.yangtools.yang.common.ErrorTag errorTag, Throwable cause) Constructs an instance with an error message, error type, error tag and exception cause.- Parameters:
message- A string which provides a plain text string describing the error.errorType- The enumerated type indicating the layer where the error occurred.errorTag- The enumerated tag representing a more specific error cause.cause- The underlying exception cause.
-
RestconfDocumentedException
public RestconfDocumentedException(String message, org.opendaylight.yangtools.yang.common.ErrorType errorType, org.opendaylight.yangtools.yang.common.ErrorTag errorTag) Constructs an instance with an error message, error type, and error tag.- Parameters:
message- A string which provides a plain text string describing the error.errorType- The enumerated type indicating the layer where the error occurred.errorTag- The enumerated tag representing a more specific error cause.
-
RestconfDocumentedException
public RestconfDocumentedException(String message, org.opendaylight.yangtools.yang.common.ErrorType errorType, org.opendaylight.yangtools.yang.common.ErrorTag errorTag, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier errorPath) Constructs an instance with an error message, error type, error tag and error path.- Parameters:
message- A string which provides a plain text string describing the error.errorType- The enumerated type indicating the layer where the error occurred.errorTag- The enumerated tag representing a more specific error cause.errorPath- The instance identifier representing error path
-
RestconfDocumentedException
Constructs an instance with an error message and exception cause. The underlying exception is included in the error-info.- Parameters:
message- A string which provides a plain text string describing the error.cause- The underlying exception cause.
-
RestconfDocumentedException
Constructs an instance with the given error. -
RestconfDocumentedException
Constructs an instance with the given errors. -
RestconfDocumentedException
public RestconfDocumentedException(String message, Throwable cause, Collection<? extends org.opendaylight.yangtools.yang.common.RpcError> rpcErrors) Constructs an instance with the given RpcErrors. -
RestconfDocumentedException
-
RestconfDocumentedException
public RestconfDocumentedException(Throwable cause, RestconfError error, org.opendaylight.yangtools.yang.model.api.EffectiveModelContext modelContext) -
RestconfDocumentedException
-
-
Method Details
-
getMessage
- Overrides:
getMessagein classThrowable
-
modelContext
public @Nullable org.opendaylight.yangtools.yang.model.api.EffectiveModelContext modelContext()Reference toEffectiveModelContextin which this exception was generated. This method will returnnullif this exception was serialized or if the context is not available.- Returns:
- Reference model context
-
getErrors
-