Error reporting within a UDX

Within a UDX, you can build in error checking and reporting capabilities by using the throwUdxException() method. The throwUdxException() method can report an error and then cancel/abort the execution of the query.

The throwUdxException() supports messages up to 300 characters. Messages that exceed the limit are truncated to the first 300 characters.

The throwUdxException() method signals an error in the UDF/UDA and returns control back to the system. Be careful to clean up memory before you use this routine.

To invoke this method, you specify throwUdxException() as follows:
throwUdxException( const char* msg );
The msg message string is returned to the SQL session. For example:
throwUdxException( "Invalid value" );