Exceptions and Custom Functions

You can raise an exception not only in almost any DML expressions, but also in C and Java-based Custom Functions. To do this you use the function return in C language, or by raising an exception in Java.

When using C language, a set of defines is provided that refer to each exception:

Defines Description
XIBRT_SUCCESS no exception raised
XIBRT_SYSFATAL a system error is detected
XIBRT_REJECT_MESSAGErejectMessage exception raised
XIBRT_REJECT_INSTANCErejectInstance exception raised

For Custom Functions written using Java programming language, raising the rejectMessage exception is accomplished by throwing a FunctionException object with its internal code set to CUSTOM_EXCEPTION.

Related Links