Class SkipProcessingException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.github.dbmdz.flusswerk.framework.exceptions.SkipProcessingException
-
- All Implemented Interfaces:
Serializable
public class SkipProcessingException extends RuntimeException
Indicates that processing should be skipped from the point on where this exception is thrown.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SkipProcessingException(String message)
Skip processing with an explanation of why.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ExceptionSupplier<SkipProcessingException>
because(String message, Object... args)
Fluid interface to create exception suppliers, e.g.SkipProcessingException
causedBy(Throwable cause)
Add the exceptions cause to the exception without interfering with the format string arguments.List<Message>
getOutgoingMessages()
SkipProcessingException
send(Message... messages)
Add messages to send to the next workflow job.SkipProcessingException
send(Collection<Message> messages)
Add messages to send to the next workflow job.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
SkipProcessingException
public SkipProcessingException(String message)
Skip processing with an explanation of why.- Parameters:
message
- Why should processing be skipped?
-
-
Method Detail
-
send
public SkipProcessingException send(Message... messages)
Add messages to send to the next workflow job.- Parameters:
messages
- The messages to send.- Returns:
this
for a fluent interface.
-
send
public SkipProcessingException send(Collection<Message> messages)
Add messages to send to the next workflow job.- Parameters:
messages
- The messages to send.- Returns:
this
for a fluent interface.
-
getOutgoingMessages
public List<Message> getOutgoingMessages()
- Returns:
- The messages that should be sent to the next workflow job.
-
causedBy
public SkipProcessingException causedBy(Throwable cause)
Add the exceptions cause to the exception without interfering with the format string arguments.- Parameters:
cause
- The cause to add- Returns:
- An augmented version of the exception including the cause
-
because
public static ExceptionSupplier<SkipProcessingException> because(String message, Object... args)
Fluid interface to create exception suppliers, e.g. for use inOptional.orElseThrow(Supplier)
.- Parameters:
message
- The message, possibly including format stringsargs
- Arguments for the format string inmessage
- Returns:
- A supplier for this exception than can be further customized
-
-