Class ProcessEngineException

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int code  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getCode()
      Accessor of the exception error code.
      void setCode​(int code)
      The exception code can be set via delegation code.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • code

        protected int code
    • Constructor Detail

      • ProcessEngineException

        public ProcessEngineException()
      • ProcessEngineException

        public ProcessEngineException​(java.lang.String message,
                                      java.lang.Throwable cause)
      • ProcessEngineException

        public ProcessEngineException​(java.lang.String message)
      • ProcessEngineException

        public ProcessEngineException​(java.lang.String message,
                                      int code)
      • ProcessEngineException

        public ProcessEngineException​(java.lang.Throwable cause)
    • Method Detail

      • setCode

        public void setCode​(int code)

        The exception code can be set via delegation code.

        Setting an error code on the exception in delegation code always overrides the exception code from a custom ExceptionCodeProvider.

        Your business logic can react to the exception code exposed via getCode() when calling Camunda Java API and is even exposed to the REST API when an error occurs.