Skip to content

Commit f39f4cf

Browse files
author
Jonathan Feinberg
committed
Merge pull request #110 from kazimuth/logfix
Fixes #109
2 parents 9aa1ddf + f9b0413 commit f39f4cf

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

runtime/src/jycessing/Runner.java

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,19 @@ public static void main(final String[] args) throws Exception {
168168
buildnum.load(buildnumberStream);
169169
}
170170
log("processing.py build ", buildnum.getProperty("build.number"));
171-
if (Arrays.asList(args).contains(ExportedSketch.ARGS_EXPORTED)) {
172-
sketch = new ExportedSketch(args);
173-
} else {
174-
sketch = new StandaloneSketch(args);
175-
}
176-
177-
runSketchBlocking(sketch, new StreamPrinter(System.out), new StreamPrinter(System.err));
178171

172+
// Try / catch to make sure we log errors
173+
try {
174+
if (Arrays.asList(args).contains(ExportedSketch.ARGS_EXPORTED)) {
175+
sketch = new ExportedSketch(args);
176+
} else {
177+
sketch = new StandaloneSketch(args);
178+
}
179+
runSketchBlocking(sketch, new StreamPrinter(System.out), new StreamPrinter(System.err));
180+
} catch (Throwable t) {
181+
System.err.println(t);
182+
System.exit(-1);
183+
}
179184
System.exit(0);
180185
}
181186

0 commit comments

Comments
 (0)