Class ThrowExceptionDefinition

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

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

      • ThrowExceptionDefinition

        public ThrowExceptionDefinition()
    • Method Detail

      • description

        protected String description()
      • getShortName

        public String getShortName()
      • 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:
        setMessage(String)
      • 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:
        setMessage(String)