mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 23:47:57 +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);
|
||||
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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user