In my previous blogpost, I have explained about JavaScript errors and how we can handle them in general and how we can handle them at application level. If you have not read it yet, you can read it here . In this blogpost, I will explain an approach to log JavaScript errors to a database table. error event on window object provides lot of information. I found below information is useful for debugging and worth logging into DB. event.message : JavaScript error message event.filename : If source of the error is from a JavaScript file, then this will give full path of JavaScript file. If error is from inline JavaScript code written in APEX page, then this will give full APEX page URL including APEX session. event.lineno : Line number where error has occurred. Depending on event.filename, it could refer to line number from JavaScript file or from generated HTML page. event.colno : Column number where error has occurred. It should be read along with event.lineno . event.err...
Sharing is a cool way of learning!