Skip to content

Commit 3414c1b

Browse files
committed
WW-4320 Chains exception to simplify debugging
1 parent 5353dfc commit 3414c1b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

plugins/javatemplates/src/main/java/org/apache/struts2/views/java/DefaultTheme.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
*/
2121
package org.apache.struts2.views.java;
2222

23+
import com.opensymphony.xwork2.config.impl.LocatableFactory;
2324
import org.apache.struts2.StrutsException;
2425
import org.apache.struts2.components.template.TemplateRenderingContext;
2526

@@ -115,11 +116,12 @@ public void renderTag(String tagName, TemplateRenderingContext context) {
115116

116117
TagGenerator gen = (TagGenerator) handlers.get(0);
117118
try {
118-
if (LOG.isTraceEnabled())
119+
if (LOG.isTraceEnabled()) {
119120
LOG.trace("Rendering tag [#0]", tagName);
121+
}
120122
gen.generate();
121123
} catch (IOException ex) {
122-
throw new StrutsException("Unable to write tag: " + tagName);
124+
throw new StrutsException("Unable to write tag: " + tagName, ex);
123125
}
124126
}
125127

0 commit comments

Comments
 (0)