diff options
| author | Javier Candeira <javier@candeira.com> | 2017-08-09 14:40:45 +1000 |
|---|---|---|
| committer | Javier Candeira <javier@candeira.com> | 2017-08-13 22:52:33 +1000 |
| commit | 35a1fea90b2cae9d5cc8e9eab62ba4c67e8786db (patch) | |
| tree | 26616de189a9154309287846bf76fb1cdab8ce51 /stmhal/pin.c | |
| parent | b6a328956467339f568b19d9192fbbfdfa47a572 (diff) | |
all: Raise exceptions via mp_raise_XXX
- Changed: ValueError, TypeError, NotImplementedError
- OSError invocations unchanged, because the corresponding utility
function takes ints, not strings like the long form invocation.
- OverflowError, IndexError and RuntimeError etc. not changed for now
until we decide whether to add new utility functions.
Diffstat (limited to 'stmhal/pin.c')
| -rw-r--r-- | stmhal/pin.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stmhal/pin.c b/stmhal/pin.c index 0dce0c1c0..8d4e80022 100644 --- a/stmhal/pin.c +++ b/stmhal/pin.c @@ -120,7 +120,7 @@ const pin_obj_t *pin_find(mp_obj_t user_obj) { pin_obj = mp_call_function_1(MP_STATE_PORT(pin_class_mapper), user_obj); if (pin_obj != mp_const_none) { if (!MP_OBJ_IS_TYPE(pin_obj, &pin_type)) { - nlr_raise(mp_obj_new_exception_msg(&mp_type_ValueError, "Pin.mapper didn't return a Pin object")); + mp_raise_ValueError("Pin.mapper didn't return a Pin object"); } if (pin_class_debug) { printf("Pin.mapper maps "); |
