mimxrt/machine_led: Use mp_raise_msg_varg helper.
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
parent
70b8e1d1f5
commit
06277a9169
|
@ -44,7 +44,7 @@ STATIC mp_obj_t led_obj_make_new(const mp_obj_type_t *type, size_t n_args, size_
|
|||
|
||||
// Check led id is in range
|
||||
if (!(1 <= led_id && led_id <= NUM_LEDS)) {
|
||||
nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_ValueError, "LED(%d) doesn't exist", led_id));
|
||||
mp_raise_msg_varg(&mp_type_ValueError, "LED(%d) doesn't exist", led_id);
|
||||
}
|
||||
|
||||
// Return reference to static object
|
||||
|
|
Loading…
Reference in New Issue