Class ProcessEngineException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AuthenticationException, AuthorizationException, BadUserRequestException, BpmnError, BpmnParseException, CaseException, ClassLoadingException, CmmnTransformException, DecisionException, DeploymentResourceNotFoundException, FormException, IdentityProviderException, MigratingProcessInstanceValidationException, MismatchingMessageCorrelationException, NullValueException, OptimisticLockingException, ParseException, PasswordEncryptionException, ProcessEngineCdiException, ProcessEnginePersistenceException, PvmException, ScriptEngineException, TaskAlreadyClaimedException, WrongDbException

public class ProcessEngineException extends RuntimeException
Runtime exception that is the superclass of all exceptions in the process engine.
Author:
Tom Baeyens
See Also:
  • Field Details

    • code

      protected int code
  • Constructor Details

    • ProcessEngineException

      public ProcessEngineException()
    • ProcessEngineException

      public ProcessEngineException(String message, Throwable cause)
    • ProcessEngineException

      public ProcessEngineException(String message)
    • ProcessEngineException

      public ProcessEngineException(String message, int code)
    • ProcessEngineException

      public ProcessEngineException(Throwable cause)
  • Method Details

    • 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.

    • getCode

      public int getCode()

      Accessor of the exception error code.

      If not changed via setCode(int), default code is BuiltinExceptionCode.FALLBACK which is always overridden by a custom or built-in error code provider.

      You can implement a custom ExceptionCodeProvider and register it in the ProcessEngineConfigurationImpl via the customExceptionCodeProvider property.