error handling with jQuery
Hi there,
I have a question concerning error handling in JS executed in the jquery environment (including jquery plugins).
Normally I can use try and catch to handle errors in JS, I can even throw errors at certain occassions. In native JS this works perfect for me.
But as soon as I execute JS within $(document).ready or within a jQuery plugin I cannot catch any errors - neither runtime errors nor thrown errors.
I found some information about jQuery.error(), which throws an error as I see in my browser JS console, but it isn't caught by the catch statement.
Can anyone give me some information how jQuery handles errors? What happens with runtime errors? How can I catch them and how can I throw errors myself?
Thank for any useful information