NativeFunctionError

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.

Values

ValueMeaning
NO_ERROR0
WRONG_NUMBER_OF_ARGS
WRONG_TYPE_OF_ARG
RETURN_VALUE_IS_EXCEPTION

Meta