When a native function or delegate encounters an error with the arguments sent,
the last reference parameter should be set to the appropriate enum value.
A specific exception can be thrown by setting the flag to RETURN_VALUE_IS_EXCEPTION and
returning a string.
If an exception is thrown directly inside a native function, the user will not be able to
see a traceback of the script source code lines where the error occurred.
When a native function or delegate encounters an error with the arguments sent, the last reference parameter should be set to the appropriate enum value. A specific exception can be thrown by setting the flag to RETURN_VALUE_IS_EXCEPTION and returning a string. If an exception is thrown directly inside a native function, the user will not be able to see a traceback of the script source code lines where the error occurred.