We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e3453f2 commit c75c31fCopy full SHA for c75c31f
src/main/java/org/scijava/script/ScriptModule.java
@@ -158,7 +158,8 @@ public void run() {
158
if (error != null) {
159
scriptContext.setErrorWriter(error);
160
errorPrinter = new PrintWriter(error);
161
- } else {
+ }
162
+ else {
163
errorPrinter = null;
164
}
165
@@ -179,11 +180,8 @@ public void run() {
179
180
while (e instanceof ScriptException && e.getCause() != null) {
181
e = e.getCause();
182
- if (error == null) {
183
- log.error(e);
184
185
- e.printStackTrace(errorPrinter);
186
- }
+ if (error == null) log.error(e);
+ else e.printStackTrace(errorPrinter);
187
188
189
// populate output values
0 commit comments