Package cn.sliew.milky.common.chain
Class PipelineException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- cn.sliew.milky.common.chain.PipelineException
-
- All Implemented Interfaces:
Serializable
public class PipelineException extends RuntimeException
Runtime Exception that wraps an underlying exception thrown during the execution of aCommandorPipeline.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PipelineException(String message)Create an exception object with a message.PipelineException(String message, Throwable cause)Create an exception object with a message and chain it to another exception.PipelineException(String message, Throwable cause, Context<K,V> context, Command<K,V> failedCommand)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<?,?>getContext()Command<?,?>getFailedCommand()-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
PipelineException
public PipelineException(String message)
Create an exception object with a message.- Parameters:
message- Message to associate with exception
-
PipelineException
public PipelineException(String message, Throwable cause)
Create an exception object with a message and chain it to another exception.- Parameters:
message- Message to associate with exceptioncause- Exception to chain to this exception
-
PipelineException
public PipelineException(String message, Throwable cause, Context<K,V> context, Command<K,V> failedCommand)
Constructs a new ChainException with references to theContextandCommandassociated with the exception being wrapped (cause).- Type Parameters:
K- Context key typeV- Context value type- Parameters:
message- the detail message. The detail message is saved for later retrieval by theThrowable.getMessage()method.cause- the cause (which is saved for later retrieval by theThrowable.getCause()method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)context- The Context object passed to theCommandin which the exception occurred.failedCommand- The Command object in which the exception was thrown.
-
-