From 2bf5a947b2b01f2be6c7b05707391dd09b240ad0 Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 15 Jun 2017 12:02:14 +1000 Subject: stmhal: Make error messages more consistent across peripherals. --- stmhal/machine_i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'stmhal/machine_i2c.c') diff --git a/stmhal/machine_i2c.c b/stmhal/machine_i2c.c index aec53205f..1be2151e3 100644 --- a/stmhal/machine_i2c.c +++ b/stmhal/machine_i2c.c @@ -510,14 +510,14 @@ mp_obj_t machine_hard_i2c_make_new(const mp_obj_type_t *type, size_t n_args, siz #endif } else { nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_ValueError, - "I2C(%s) does not exist", port)); + "I2C(%s) doesn't exist", port)); } } else { i2c_id = mp_obj_get_int(args[ARG_id].u_obj); if (i2c_id < 1 || i2c_id > MP_ARRAY_SIZE(machine_hard_i2c_obj) || machine_hard_i2c_obj[i2c_id - 1].base.type == NULL) { nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_ValueError, - "I2C(%d) does not exist", i2c_id)); + "I2C(%d) doesn't exist", i2c_id)); } } -- cgit v1.2.3