Class RestconfDocumentedException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.opendaylight.restconf.common.errors.RestconfDocumentedException
All Implemented Interfaces:
Serializable

public class RestconfDocumentedException extends RuntimeException
Unchecked exception to communicate error information, as defined "errors" YANG Data Template.
Author:
Devin Avery, Thomas Pantelis
See Also:
  • Constructor Details

    • RestconfDocumentedException

      public RestconfDocumentedException(String message)
      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

      public RestconfDocumentedException(String message, Throwable cause)
      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

      public RestconfDocumentedException(RestconfError error)
      Constructs an instance with the given error.
    • RestconfDocumentedException

      public RestconfDocumentedException(String message, Throwable cause, List<RestconfError> errors)
      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

      public RestconfDocumentedException(Throwable cause, RestconfError error)
    • RestconfDocumentedException

      public RestconfDocumentedException(Throwable cause, RestconfError error, org.opendaylight.yangtools.yang.model.api.EffectiveModelContext modelContext)
    • RestconfDocumentedException

      public RestconfDocumentedException(Throwable cause, List<RestconfError> errors)
  • Method Details

    • getMessage

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

      public @Nullable org.opendaylight.yangtools.yang.model.api.EffectiveModelContext modelContext()
      Reference to EffectiveModelContext in which this exception was generated. This method will return null if this exception was serialized or if the context is not available.
      Returns:
      Reference model context
    • getErrors

      public List<RestconfError> getErrors()