Class OperationFailedException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.opendaylight.yangtools.yang.common.OperationFailedException
-
- All Implemented Interfaces:
Serializable
public class OperationFailedException extends Exception
A general base exception for an operation failure.- Author:
- Thomas Pantelis
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description OperationFailedException(String message, Throwable cause)
Constructs a new instance with the specified detail message and cause.OperationFailedException(String message, Throwable cause, Collection<RpcError> errors)
Constructs a new instance with the specified detail message, cause and errors.OperationFailedException(String message, Throwable cause, RpcError... errors)
Constructs a new instance with the specified detail message, cause and errors.OperationFailedException(String message, Collection<? extends RpcError> errors)
Constructs a new instance with the specified detail message and errors.OperationFailedException(String message, RpcError error)
Constructs a new instance with the specified detail message and error.OperationFailedException(String message, RpcError... errors)
Constructs a new instance with the specified detail message and errors.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected MoreObjects.ToStringHelper
addToStringAttributes(MoreObjects.ToStringHelper helper)
List<RpcError>
getErrorList()
Returns additional error information about this exception.String
toString()
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
-
-
-
Constructor Detail
-
OperationFailedException
public OperationFailedException(String message, Throwable cause)
Constructs a new instance with the specified detail message and cause.- Parameters:
message
- the detail messagecause
- the cause- Throws:
NullPointerException
- ifmessage
isnull
-
OperationFailedException
public OperationFailedException(String message, RpcError error)
Constructs a new instance with the specified detail message and error.- Parameters:
message
- the detail messageerror
-RpcError
instance that provides additional error information about this exception- Throws:
NullPointerException
- if any argument isnull
-
OperationFailedException
public OperationFailedException(String message, Throwable cause, Collection<RpcError> errors)
Constructs a new instance with the specified detail message, cause and errors.- Parameters:
message
- the detail messagecause
- the causeerrors
-RpcError
instances that provide additional error information about this exception- Throws:
NullPointerException
- if eithermessage
orerrors
isnull
, or iferrors
contains anull
element.
-
OperationFailedException
public OperationFailedException(String message, Collection<? extends RpcError> errors)
Constructs a new instance with the specified detail message and errors.- Parameters:
message
- the detail messageerrors
-RpcError
instances that provide additional error information about this exception- Throws:
NullPointerException
- if any argument is, orerrors
contains,null
-
OperationFailedException
public OperationFailedException(String message, RpcError... errors)
Constructs a new instance with the specified detail message and errors.- Parameters:
message
- the detail messageerrors
-RpcError
instances that provide additional error information about this exception- Throws:
NullPointerException
- if any argument is, orerrors
contains,null
-
OperationFailedException
public OperationFailedException(String message, Throwable cause, RpcError... errors)
Constructs a new instance with the specified detail message, cause and errors.- Parameters:
message
- the detail messagecause
- the causeerrors
-RpcError
instances that provide additional error information about this exception
-
-
Method Detail
-
getErrorList
public List<RpcError> getErrorList()
Returns additional error information about this exception.- Returns:
- a List of RpcErrors. There is always at least one RpcError.
-
addToStringAttributes
protected MoreObjects.ToStringHelper addToStringAttributes(MoreObjects.ToStringHelper helper)
-
-