Added some minor exception handling improvements

This commit is contained in:
Jeff Parsons 2014-10-30 12:06:26 -07:00 committed by jeffpar
commit c2a89b07dd
12 changed files with 1141 additions and 1140 deletions

View file

@ -717,8 +717,12 @@ web.onExit = function(fn)
web.doPageEvent = function(afn)
{
if (web.fPageEventsEnabled) {
for (var i = 0; i < afn.length; i++) {
afn[i]();
try {
for (var i = 0; i < afn.length; i++) {
afn[i]();
}
} catch(e) {
Component.notice("An unexpected exception occurred:\n\n" + e.message + "\n\nPlease send this information to Jeff@pcjs.org. Thanks.");
}
}
};