mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 01:57:59 +01:00
Fix: When one of functional AutoCommand raise a error, remaining AutoCommands are not executed.
This commit is contained in:
@@ -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