Language API

In JavaScript, exceptions that occur during runtime are usually handled by using try/catch blocks. The Language API is implemented for exceptions that are not handled using try/catch blocks.

The Language API uses kony.lang namespace and the following API elements.

Function Description
kony.lang.getUncaughtExceptionHandler Retrieves the reference to a JavaScript function that is currently set as an exception handler for all uncaught exceptions.
kony.lang.setUncaughtExceptionHandler Sets a JavaScript function as an exception handler for all uncaught exceptions.
 

Set an exception handler for all the uncaught exceptions using the kony.lang.setUncaughtExceptionHandler function. You can get the reference to a JavaScript function that is currently set as an expection handler for all uncaught exceptions using the kony.lang.getUncaughtExceptionHandler function.