Class NodeThrewException

All Implemented Interfaces:
IXfcException, IBaseCompletionResult, IErrorResultData, IExceptionalCompletionResult, Serializable

public final class NodeThrewException extends AbstractAbruptCompletionException implements IExceptionalCompletionResult
Indicates that execution of a workflow node ended abruptly via a throw statement, including exceptions thrown by the workflow runtime engine.

Essentially, this is what you should use when you want to throw an exception that users can catch via try-catch node.

Since:
7.0.0
Author:
XIMA MEDIA GmbH
See Also:
  • Constructor Details

    • NodeThrewException

      @Deprecated public NodeThrewException(WorkflowNode node, Object alwaysValue, IDiscriminatedUnionMember<String,?> errorData, IWorkflowFileValue fileValue, String message)
      Deprecated.
      Use builder(WorkflowNode). Ideally, do not create instances directly, prefer using INodeExecutionParams.throwingException().
      Creates a new exception with the given data for a node that wants to end abruptly by throwing.
      Parameters:
      node - Node that throws this exception.
      alwaysValue - Data made available by the node irrespective of how it ends.
      errorData - Data made available by the node when it ends abruptly by throwing an exception.
      fileValue - List of files made available by the node.
      message - Error message describing the error that occurred.
    • NodeThrewException

      @Deprecated public NodeThrewException(WorkflowNode node, Object alwaysValue, IDiscriminatedUnionMember<String,?> errorData, IWorkflowFileValue fileValue, String message, Throwable cause)
      Deprecated.
      Use builder(WorkflowNode). Ideally, do not create instances directly, prefer using INodeExecutionParams.throwingException().
      Creates a new exception with the given data for a node that wants to end abruptly by throwing.
      Parameters:
      node - Node that throws this exception.
      alwaysValue - Data made available by the node irrespective of how it ends.
      errorData - Data made available by the node when it ends abruptly by throwing an exception.
      fileValue - List of files made available by the node.
      message - Error message describing the error that occurred.
      cause - Cause that resulted in this exception.
    • NodeThrewException

      @Deprecated public NodeThrewException(WorkflowNode node, Object alwaysValue, IDiscriminatedUnionMember<String,?> errorData, IWorkflowFileValue fileValue, Throwable cause)
      Deprecated.
      Use builder(WorkflowNode). Ideally, do not create instances directly, prefer using INodeExecutionParams.throwingException().
      Creates a new exception with the given data for a node that wants to end abruptly by throwing.
      Parameters:
      node - Node that throws this exception.
      alwaysValue - Data made available by the node irrespective of how it ends.
      errorData - Data made available by the node when it ends abruptly by throwing an exception.
      fileValue - List of files made available by the node.
      cause - Cause that resulted in this exception.
  • Method Details

    • getWorkflowExceptionData

      public Object getWorkflowExceptionData()
      Specified by:
      getWorkflowExceptionData in interface IErrorResultData
      Returns:
      Custom data for the exception type that contain further details on the error. May be null in case no data is available.
    • getWorkflowExceptionType

      public String getWorkflowExceptionType()
      Specified by:
      getWorkflowExceptionType in interface IErrorResultData
      Returns:
      Describes the type of error that occurred during the execution of a workflow node. Empty string for a general error that cannot be classified further.
    • builder

      public static NodeThrewException.Builder builder(WorkflowNode node)
      Parameters:
      node - The node that did finish execution.
      Returns:
      A new builder for a NodeThrewException.
      Since:
      8.1.0