diff options
author | Daniel Campora <daniel@wipy.io> | 2015-06-23 15:30:49 +0200 |
---|---|---|
committer | Daniel Campora <daniel@wipy.io> | 2015-06-23 15:30:49 +0200 |
commit | 228c68a9cd02cfc3e9c6019f82b3b5992b5f613b (patch) | |
tree | a0957e4ded5cf86332082562a71d868ec5a5b004 /py/parsenum.c | |
parent | 6e1dfb0d1aa3e93deab7ff2f9ce68a487d66a1c0 (diff) |
py: Change exception type to ValueError when error reporting is terse.
Addresses issue #1347
Diffstat (limited to 'py/parsenum.c')
-rw-r--r-- | py/parsenum.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/py/parsenum.c b/py/parsenum.c index 9f85ae8bd..ae04aa426 100644 --- a/py/parsenum.c +++ b/py/parsenum.c @@ -142,9 +142,9 @@ overflow: } value_error: - // if lex!=NULL then the parser called us and we need to make a SyntaxError with traceback + // if lex!=NULL then the parser called us and we need to make a ValueError with traceback if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) { - mp_obj_t exc = mp_obj_new_exception_msg(&mp_type_SyntaxError, + mp_obj_t exc = mp_obj_new_exception_msg(&mp_type_ValueError, "invalid syntax for integer"); raise_exc(exc, lex); } else { |