py: Change exception type to ValueError when error reporting is terse.

Addresses issue #1347
This commit is contained in:
Daniel Campora 2015-06-23 15:30:49 +02:00
parent 6e1dfb0d1a
commit 228c68a9cd
1 changed files with 2 additions and 2 deletions

View File

@ -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 {