mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-10-21 08:15:42 +02:00
Fix: When one of functional AutoCommand raise a error, remaining AutoCommands are not executed.
This commit is contained in:
1 parent
a216ec45d9
commit
b200139456
1 file changed
+11
-1
@@ -255,7 +255,17 @@ function AutoCommands() //{{{
|
|||||||
|
|
||||||
liberator.echomsg("autocommand " + autoCmd.command, 9);
|
liberator.echomsg("autocommand " + autoCmd.command, 9);
|
||||||
if (typeof autoCmd.command == "function")
|
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
|
else
|
||||||
liberator.execute(commands.replaceTokens(autoCmd.command, args));
|
liberator.execute(commands.replaceTokens(autoCmd.command, args));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user