Interface ExceptionCodeProvider
public interface ExceptionCodeProvider
One of the provider methods are called when a ProcessEngineException occurs.
The default implementation provides the built-in exception codes.
You can disable the built-in or/and additionally register a custom provider via
the ProcessEngineConfigurationImpl using the following properties:
disableExceptionCode- disables the whole featuredisableBuiltinExceptionCodeProvider- only disables the built-in provider and allows overriding reserved exception codescustomExceptionCodeProvider- provide custom exception codes
-
Method Summary
Modifier and TypeMethodDescriptiondefault IntegerprovideCode(SQLException sqlException) Called when aSQLExceptionoccurs.default IntegerprovideCode(ProcessEngineException processEngineException) Called when aProcessEngineExceptionoccurs.
-
Method Details
-
provideCode
Called when a
ProcessEngineExceptionoccurs.Provides the exception code that can be determined based on the passed
ProcessEngineException. Only called when no other provider method is called.- Parameters:
processEngineException- that occurred.- Returns:
- an integer value representing the error code. When returning
null, theBuiltinExceptionCode.FALLBACKgets assigned to the exception.
-
provideCode
Called when a
SQLExceptionoccurs.Provides the exception code that can be determined based on the passed
SQLException. The error code is assigned to the top levelProcessEngineException. Only called when no other provider method is called.- Parameters:
sqlException- that occurred.- Returns:
- an integer value representing the error code. When returning
null, theBuiltinExceptionCode.FALLBACKgets assigned to the exception.
-