Package org.jboss.as.controller
Class OperationFailedException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.jboss.as.controller.OperationFailedException
-
- All Implemented Interfaces:
Serializable,OperationClientException
public class OperationFailedException extends Exception implements OperationClientException
Exception indicating an operation has failed due to a client mistake (e.g. an operation with invalid parameters was invoked.) Should not be used to report server failures.- Author:
- David M. Lloyd
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description OperationFailedException(String message)Constructs aOperationFailedExceptionwith the given message.OperationFailedException(String message, Throwable cause)Constructs aOperationFailedExceptionwith the specified cause and message.OperationFailedException(String msg, Throwable cause, org.jboss.dmr.ModelNode description)Constructs aOperationFailedExceptionwith the specified detail message and cause.OperationFailedException(String msg, org.jboss.dmr.ModelNode description)Constructs aOperationFailedExceptionwith the specified detail message.OperationFailedException(Throwable cause)Constructs aOperationFailedExceptionwith the specified cause.OperationFailedException(Throwable cause, org.jboss.dmr.ModelNode description)Constructs aOperationFailedExceptionwith the specified cause.OperationFailedException(org.jboss.dmr.ModelNode description)Deprecated.provide a message and useOperationFailedException(String, org.jboss.dmr.ModelNode)or if thedescriptionmodel node isModelType.STRING, just useOperationFailedException(String)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.jboss.dmr.ModelNodegetFailureDescription()Get the detyped failure description.StringtoString()-
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)
Constructs aOperationFailedExceptionwith the given message. The message is also used as thefailure description. The cause is not initialized, and may subsequently be initialized by a call toinitCause.- Parameters:
message- the description of the failure. Cannot benull
-
OperationFailedException
public OperationFailedException(String message, Throwable cause)
Constructs aOperationFailedExceptionwith the specified cause and message. The message is also used as thefailure description.- Parameters:
message- the description of the failure. Cannot benullcause- the cause (which is saved for later retrieval by theThrowable.getCause()method)
-
OperationFailedException
@Deprecated public OperationFailedException(org.jboss.dmr.ModelNode description)
Deprecated.provide a message and useOperationFailedException(String, org.jboss.dmr.ModelNode)or if thedescriptionmodel node isModelType.STRING, just useOperationFailedException(String)Constructs aOperationFailedExceptionwith no detail message. The cause is not initialized, and may subsequently be initialized by a call toinitCause.- Parameters:
description- the description of the failure. Cannot benull
-
OperationFailedException
public OperationFailedException(String msg, org.jboss.dmr.ModelNode description)
Constructs aOperationFailedExceptionwith the specified detail message. The cause is not initialized, and may subsequently be initialized by a call toinitCause.- Parameters:
msg- the detail messagedescription- the description of the failure. Cannot benull
-
OperationFailedException
public OperationFailedException(Throwable cause)
Constructs aOperationFailedExceptionwith the specified cause. Thecause's messageis also used as thefailure description.- Parameters:
cause- the cause (which is saved for later retrieval by theThrowable.getCause()method). Cannot benull
-
OperationFailedException
public OperationFailedException(Throwable cause, org.jboss.dmr.ModelNode description)
Constructs aOperationFailedExceptionwith the specified cause. The detail message is set to:(cause == null ? null : cause.toString())
(which typically contains the class and detail message ofcause).- Parameters:
cause- the cause (which is saved for later retrieval by theThrowable.getCause()method)description- the description of the failure. Cannot benull
-
OperationFailedException
public OperationFailedException(String msg, Throwable cause, org.jboss.dmr.ModelNode description)
Constructs aOperationFailedExceptionwith the specified detail message and cause.- Parameters:
msg- the detail messagecause- the cause (which is saved for later retrieval by theThrowable.getCause()method)description- the description of the failure. Cannot benull
-
-
Method Detail
-
getFailureDescription
public org.jboss.dmr.ModelNode getFailureDescription()
Get the detyped failure description.- Specified by:
getFailureDescriptionin interfaceOperationClientException- Returns:
- the description. Will not be
null
-
-