Class ThrowExceptionDefinition

All Implemented Interfaces:
org.apache.camel.CamelContextAware, org.apache.camel.LineNumberAware, Block, org.apache.camel.NamedNode, org.apache.camel.spi.HasCamelContext, org.apache.camel.spi.HasId, org.apache.camel.spi.IdAware

@Metadata(label="error") public class ThrowExceptionDefinition extends NoOutputDefinition<ThrowExceptionDefinition>
Throws an exception
  • Constructor Details

    • ThrowExceptionDefinition

      public ThrowExceptionDefinition()
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • description

      protected String description()
    • getShortName

      public String getShortName()
    • getLabel

      public String getLabel()
      Description copied from class: ProcessorDefinition
      Returns a label to describe this node such as the expression if some kind of expression node
      Specified by:
      getLabel in interface org.apache.camel.NamedNode
      Overrides:
      getLabel in class ProcessorDefinition<ThrowExceptionDefinition>
    • getRef

      public String getRef()
    • setRef

      public void setRef(String ref)
      Reference to the exception instance to lookup from the registry to throw
    • getException

      public Exception getException()
    • setException

      public void setException(Exception exception)
    • getMessage

      public String getMessage()
    • setMessage

      public void setMessage(String message)
      To create a new exception instance and use the given message as caused message (supports simple language)
    • getExceptionType

      public String getExceptionType()
    • setExceptionType

      public void setExceptionType(String exceptionType)
      The class of the exception to create using the message.
      See Also:
    • getExceptionClass

      public Class<? extends Exception> getExceptionClass()
    • setExceptionClass

      public void setExceptionClass(Class<? extends Exception> exceptionClass)
      The class of the exception to create using the message.
      See Also: