summaryrefslogtreecommitdiff
path: root/stmhal/can.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-06-15 12:02:14 +1000
committerDamien George <damien.p.george@gmail.com>2017-06-15 12:02:14 +1000
commit2bf5a947b2b01f2be6c7b05707391dd09b240ad0 (patch)
treeb877cdfe14d17ff129d7e60a587b92aed39023e7 /stmhal/can.c
parent48d867b4a68e53901aac87c2ff0f2a7e65f735c7 (diff)
stmhal: Make error messages more consistent across peripherals.
Diffstat (limited to 'stmhal/can.c')
-rw-r--r--stmhal/can.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/stmhal/can.c b/stmhal/can.c
index afc1b367f..6152022b7 100644
--- a/stmhal/can.c
+++ b/stmhal/can.c
@@ -321,7 +321,7 @@ STATIC mp_obj_t pyb_can_init_helper(pyb_can_obj_t *self, mp_uint_t n_args, const
// init CAN (if it fails, it's because the port doesn't exist)
if (!can_init(self)) {
- nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_ValueError, "CAN port %d does not exist", self->can_id));
+ nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_ValueError, "CAN(%d) doesn't exist", self->can_id));
}
return mp_const_none;
@@ -357,13 +357,13 @@ STATIC mp_obj_t pyb_can_make_new(const mp_obj_type_t *type, size_t n_args, size_
can_idx = PYB_CAN_2;
#endif
} else {
- nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_ValueError, "CAN(%s) does not exist", port));
+ nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_ValueError, "CAN(%s) doesn't exist", port));
}
} else {
can_idx = mp_obj_get_int(args[0]);
}
if (can_idx < 1 || can_idx > MP_ARRAY_SIZE(MP_STATE_PORT(pyb_can_obj_all))) {
- nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_ValueError, "CAN(%d) does not exist", can_idx));
+ nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_ValueError, "CAN(%d) doesn't exist", can_idx));
}
pyb_can_obj_t *self;