Login Register

window.onerror in dojo

Hello to every body.
i have a problem to catch errors in dojo.
in javascript if we set 'window.onerror' to a function when we have
an error in codes. call this function.

e.g.
window.onerror = function(message) {alert(message);};

but this don't work in dojo functions.
i can not solve this problem.
can every body help me?

thanks