If I have a javascript error outside of a callback, Firebug console prints out the error. However, if I have ant error inside a callback, I will not see any printout.
document.observe('dom:loaded', function() {
// not notified in console
alert(undefinedVariable);
});
// notified in console
alert(anotherUndefinedVariable);
Almost all of my code is inside callbacks, so it is making it hard for me to track down errors. How do I print out every error in the console no matter where the error occurs?
I needed to tell Prototype to not swallow the exceptions.