From 0935d962fcae22226db983c573de68ae4cd2e66c Mon Sep 17 00:00:00 2001 From: jglick Date: Mon, 25 Jan 2010 16:41:11 +0000 Subject: [PATCH] [HUDSON-4876] Improving RestartNotSupportedException diagnostics. Getting the following in 1.336 on Solaris, which does not tell you what is actually wrong (what subclass does not override restart?): hudson.lifecycle.RestartNotSupportedException: Restart is not supported in this running mode. at hudson.lifecycle.Lifecycle.verifyRestartable(Lifecycle.java:161) at hudson.model.Hudson.safeRestart(Hudson.java:2928) git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@26362 71c3de6d-444a-0410-be80-ed276b4c234a --- core/src/main/java/hudson/lifecycle/Lifecycle.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/hudson/lifecycle/Lifecycle.java b/core/src/main/java/hudson/lifecycle/Lifecycle.java index a77659762a..9ce2de0dc1 100644 --- a/core/src/main/java/hudson/lifecycle/Lifecycle.java +++ b/core/src/main/java/hudson/lifecycle/Lifecycle.java @@ -158,7 +158,8 @@ public abstract class Lifecycle implements ExtensionPoint { public void verifyRestartable() throws RestartNotSupportedException { // the rewriteHudsonWar method isn't overridden. if (!Util.isOverridden(Lifecycle.class,getClass(), "restart")) - throw new RestartNotSupportedException("Restart is not supported in this running mode."); + throw new RestartNotSupportedException("Restart is not supported in this running mode (" + + getClass().getName() + ")."); } /**