aboutsummaryrefslogtreecommitdiff
path: root/ports/nrf/boards
diff options
context:
space:
mode:
authorDamien George2020-04-09 17:22:25 +1000
committerDamien George2020-04-13 22:19:37 +1000
commit8e048d2548867aac743866ca5a4c244b7b5aac09 (patch)
treee62e2ce312ba0e6dc498d7db8901d935f6afd3de /ports/nrf/boards
parentdb137e70dcf67de26828e17c2d3dc9d21e971eb0 (diff)
all: Clean up error strings to use lowercase and change cannot to can't.
Now that error string compression is supported it's more important to have consistent error string formatting (eg all lowercase English words, consistent contractions). This commit cleans up some of the strings to make them more consistent.
Diffstat (limited to 'ports/nrf/boards')
-rw-r--r--ports/nrf/boards/microbit/modules/microbitimage.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ports/nrf/boards/microbit/modules/microbitimage.c b/ports/nrf/boards/microbit/modules/microbitimage.c
index 56bd18c6e..d697a9081 100644
--- a/ports/nrf/boards/microbit/modules/microbitimage.c
+++ b/ports/nrf/boards/microbit/modules/microbitimage.c
@@ -351,7 +351,7 @@ mp_obj_t microbit_image_get_pixel(mp_obj_t self_in, mp_obj_t x_in, mp_obj_t y_in
mp_int_t x = mp_obj_get_int(x_in);
mp_int_t y = mp_obj_get_int(y_in);
if (x < 0 || y < 0) {
- mp_raise_ValueError(MP_ERROR_TEXT("index cannot be negative"));
+ mp_raise_ValueError(MP_ERROR_TEXT("index can't be negative"));
}
if (x < imageWidth(self) && y < imageHeight(self)) {
return MP_OBJ_NEW_SMALL_INT(imageGetPixelValue(self, x, y));
@@ -363,7 +363,7 @@ MP_DEFINE_CONST_FUN_OBJ_3(microbit_image_get_pixel_obj, microbit_image_get_pixel
/* Raise an exception if not mutable */
static void check_mutability(microbit_image_obj_t *self) {
if (self->base.five) {
- mp_raise_TypeError(MP_ERROR_TEXT("image cannot be modified (try copying first)"));
+ mp_raise_TypeError(MP_ERROR_TEXT("image can't be modified (try copying first)"));
}
}
@@ -375,7 +375,7 @@ mp_obj_t microbit_image_set_pixel(mp_uint_t n_args, const mp_obj_t *args) {
mp_int_t x = mp_obj_get_int(args[1]);
mp_int_t y = mp_obj_get_int(args[2]);
if (x < 0 || y < 0) {
- mp_raise_ValueError(MP_ERROR_TEXT("index cannot be negative"));
+ mp_raise_ValueError(MP_ERROR_TEXT("index can't be negative"));
}
mp_int_t bright = mp_obj_get_int(args[3]);
if (bright < 0 || bright > MAX_BRIGHTNESS)
@@ -416,7 +416,7 @@ mp_obj_t microbit_image_blit(mp_uint_t n_args, const mp_obj_t *args) {
mp_int_t w = mp_obj_get_int(args[4]);
mp_int_t h = mp_obj_get_int(args[5]);
if (w < 0 || h < 0) {
- mp_raise_ValueError(MP_ERROR_TEXT("size cannot be negative"));
+ mp_raise_ValueError(MP_ERROR_TEXT("size can't be negative"));
}
mp_int_t xdest;
mp_int_t ydest;