Skip to content

Commit 7d4fa2c

Browse files
Merge pull request #504 from thomasmulvaney/catch-compile-exception
catch exception when compiling with -c
2 parents 36ce07e + bb7b335 commit 7d4fa2c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

target.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,11 @@ def __init__(self, filename):
117117

118118
def inner_invoke(self, args):
119119
import pixie.vm.rt as rt
120-
121-
rt.compile_file(rt.wrap(self._filename))
120+
try:
121+
rt.compile_file(rt.wrap(self._filename))
122+
except WrappedException as ex:
123+
print "Error: ", ex._ex.__repr__()
124+
os._exit(1)
122125

123126

124127
class IsPreloadFlag(object):

0 commit comments

Comments
 (0)