Hudson now handles unexpected failures in trigger plugins more gracefully.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@17621 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2009-04-29 16:31:30 +00:00
1 parent b9e80b7d49
commit 52277c5bf2
1 file changed
+7 -1
@@ -225,7 +225,13 @@ public abstract class Trigger<J extends Item> implements Describable<Trigger<?>>
if (t.tabs.check(cal)) {
LOGGER.config("cron triggered "+p.getName());
t.run();
try {
t.run();
} catch (Throwable e) {
// t.run() is a plugin, and some of them throw RuntimeException and other things.
// don't let that cancel the polling activity. report and move on.
LOGGER.log(Level.WARNING, t.getClass().getName()+".run() failed for "+p.getName(),e);
}
}
}
}