Troubleshoot JS lang procedures¶
The component includes a set of User-Defined Functions (UDFs) that retrieve and clear information about the last JS error that occurred in the current connection for the current user. This information updates each time a JS error occurs for the current connection and user. Successful execution of JS code does not change this state.
The following UDFs are helpful for debugging JS code.
-
JS_GET_LAST_ERROR()
: Returns the error message for the last JS error that occurred in the current connection for the current user. -
JS_GET_LAST_ERROR_INFO()
: Provides extended information about the last JS error that occurred in the current connection for the current user. In addition to the error message, it includes the exact line and column where the problem occurred and the stack trace if available. -
JS_CLEAR_LAST_ERROR()
: Resets the information about the last JS error for the current connection and user, as if no error had occurred.
Get expert help¶
If you need assistance, visit the community forum for comprehensive and free database knowledge, or contact our Percona Database Experts for professional support and services.