From b200139456be1b36e73ad2a57192260a273778a7 Mon Sep 17 00:00:00 2001 From: anekos Date: Thu, 18 Dec 2008 19:00:02 +0900 Subject: [PATCH] Fix: When one of functional AutoCommand raise a error, remaining AutoCommands are not executed. --- common/content/events.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/common/content/events.js b/common/content/events.js index dce30d80..87dc2617 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -255,7 +255,17 @@ function AutoCommands() //{{{ liberator.echomsg("autocommand " + autoCmd.command, 9); if (typeof autoCmd.command == "function") - autoCmd.command.call(autoCmd, args); + { + try + { + autoCmd.command.call(autoCmd, args); + } + catch(e) + { + liberator.reportError(e); + liberator.echoerr(e); + } + } else liberator.execute(commands.replaceTokens(autoCmd.command, args)); }