BLSetErrorHandler
Sets a Blend2D error handler.
Definition
Unit: Blend2D
Parameters
AHandler
: TBLErrorHandler
: The error handler that is called when a Blend2D error occurs.
AUserData
: Pointer
: Any data you want to pass to the handler.
See Also
Remarks
The default error handler raises an exception of type EBlend2DError
. You can disable error handling completely by setting AHandler to nil. In that case, there is no way to know if and when an error occured.
The following procedures can be used to set some default error handlers: * BLSetExceptionErrorHandler
: sets the error handler to a procedure that raises an exception when a Blend2D error occurs. This is the default behavior. * BLSetGetLastErrorHandler
: sets the error handler to a procedure that sets a global error variable when a Blend2D error occurs. You can then use BLGetLastError
to retrieve this error code.