aboutsummaryrefslogtreecommitdiff
path: root/py/bc.c
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2021-04-22 12:13:58 +1000
committerDamien George <damien@micropython.org>2021-04-27 23:51:52 +1000
commitd4b706c4d01377d42855ff1544ced77536f69caf (patch)
treecfdb78c011813396af745720c1a7754ac91487d7 /py/bc.c
parent30d9f77cc535306eeb9eed6f17e71355fd58995a (diff)
py: Add option to compile without any error messages at all.
This introduces a new option, MICROPY_ERROR_REPORTING_NONE, which completely disables all error messages. To be used in cases where MicroPython needs to fit in very limited systems. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'py/bc.c')
-rw-r--r--py/bc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/py/bc.c b/py/bc.c
index 34bc78fd3..58694b97d 100644
--- a/py/bc.c
+++ b/py/bc.c
@@ -75,7 +75,7 @@ const byte *mp_decode_uint_skip(const byte *ptr) {
#endif
STATIC NORETURN void fun_pos_args_mismatch(mp_obj_fun_bc_t *f, size_t expected, size_t given) {
- #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
+ #if MICROPY_ERROR_REPORTING <= MICROPY_ERROR_REPORTING_TERSE
// generic message, used also for other argument issues
(void)f;
(void)expected;
@@ -212,7 +212,7 @@ void mp_setup_code_state(mp_code_state_t *code_state, size_t n_args, size_t n_kw
}
// Didn't find name match with positional args
if ((scope_flags & MP_SCOPE_FLAG_VARKEYWORDS) == 0) {
- #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
+ #if MICROPY_ERROR_REPORTING <= MICROPY_ERROR_REPORTING_TERSE
mp_raise_TypeError(MP_ERROR_TEXT("unexpected keyword argument"));
#else
mp_raise_msg_varg(&mp_type_TypeError,