Package org.camunda.bpm.engine
Class ProcessEngineException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.camunda.bpm.engine.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
Runtime exception that is the superclass of all exceptions in the process engine.
- Author:
- Tom Baeyens
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionProcessEngineException
(String message) ProcessEngineException
(String message, int code) ProcessEngineException
(String message, Throwable cause) ProcessEngineException
(Throwable cause) -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
code
protected int code
-
-
Constructor Details
-
ProcessEngineException
public ProcessEngineException() -
ProcessEngineException
-
ProcessEngineException
-
ProcessEngineException
-
ProcessEngineException
-
-
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 isBuiltinExceptionCode.FALLBACK
which is always overridden by a custom or built-in error code provider.You can implement a custom
ExceptionCodeProvider
and register it in theProcessEngineConfigurationImpl
via thecustomExceptionCodeProvider
property.
-