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
,ELException
,FormException
,IdentityProviderException
,MigratingProcessInstanceValidationException
,MismatchingMessageCorrelationException
,NullValueException
,OptimisticLockingException
,ParseException
,PasswordEncryptionException
,ProcessEngineCdiException
,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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected int
code
-
Constructor Summary
Constructors Constructor Description ProcessEngineException()
ProcessEngineException(String message)
ProcessEngineException(String message, int code)
ProcessEngineException(String message, Throwable cause)
ProcessEngineException(Throwable cause)
-
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
-
-
-
-
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.
-
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.
-
-