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
All Methods Instance Methods Default Methods Modifier and Type Method Description default Integer
provideCode(SQLException sqlException)
Called when aSQLException
occurs.default Integer
provideCode(ProcessEngineException processEngineException)
Called when aProcessEngineException
occurs.
-
-
-
Method Detail
-
provideCode
default Integer provideCode(ProcessEngineException processEngineException)
Called when a
ProcessEngineException
occurs.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.FALLBACK
gets assigned to the exception.
-
provideCode
default Integer provideCode(SQLException sqlException)
Called when a
SQLException
occurs.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.FALLBACK
gets assigned to the exception.
-
-