aboutsummaryrefslogtreecommitdiff
path: root/bare-arm/main.c
diff options
context:
space:
mode:
authorDamien George2014-10-05 19:01:34 +0100
committerDamien George2014-10-05 19:01:34 +0100
commita91ac2011f0131ce550bf227d78ccccbdab4f882 (patch)
tree4efcd77de48edbf4017307babe46e9e6b1337c17 /bare-arm/main.c
parent6dba992182af9b3a73711958de2eeeb33b7f69f6 (diff)
py: Make compiler return a proper exception on SyntaxError.
Diffstat (limited to 'bare-arm/main.c')
-rw-r--r--bare-arm/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bare-arm/main.c b/bare-arm/main.c
index 983810c89..084374d3f 100644
--- a/bare-arm/main.c
+++ b/bare-arm/main.c
@@ -36,8 +36,9 @@ void do_str(const char *src) {
mp_lexer_free(lex);
mp_obj_t module_fun = mp_compile(pn, source_name, MP_EMIT_OPT_NONE, true);
- if (module_fun == mp_const_none) {
+ if (mp_obj_is_exception_instance(module_fun)) {
// compile error
+ mp_obj_print_exception(module_fun);
return;
}