py: Make compiler return a proper exception on SyntaxError.

This commit is contained in:
Damien George
2014-10-05 19:01:34 +01:00
parent 6dba992182
commit a91ac2011f
10 changed files with 53 additions and 37 deletions

View File

@@ -79,8 +79,8 @@ void do_file(const char *file) {
//printf("----------------\n");
if (module_fun == mp_const_none) {
printf("compile error\n");
if (mp_obj_is_exception_instance(module_fun)) {
mp_obj_print_exception(module_fun);
}
}
}