Skip to content

Commit 1e914ac

Browse files
committed
Change exception text and type
1 parent 75b5142 commit 1e914ac

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ports/mimxrt10xx/common-hal/busio/SPI.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ void common_hal_busio_spi_construct(busio_spi_obj_t *self,
157157
if (spi_taken) {
158158
mp_raise_ValueError(translate("Hardware busy, try alternative pins"));
159159
} else {
160-
mp_raise_ValueError(translate("Invalid SPI pin selection"));
160+
mp_raise_ValueError(translate("Invalid pins"));
161161
}
162162
}
163163

ports/mimxrt10xx/common-hal/busio/UART.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,15 +143,15 @@ void common_hal_busio_uart_construct(busio_uart_obj_t *self,
143143
}
144144

145145
if (uart_taken) {
146-
mp_raise_RuntimeError(translate("Hardware in use, try alternative pins"));
146+
mp_raise_ValueError(translate("Hardware in use, try alternative pins"));
147147
}
148148

149149
if(self->rx == NULL && self->tx == NULL) {
150-
mp_raise_RuntimeError(translate("Invalid UART pin selection"));
150+
mp_raise_ValueError(translate("Invalid pins"));
151151
}
152152

153153
if (is_onedirection && ((rts != NULL) || (cts != NULL))) {
154-
mp_raise_RuntimeError(translate("Both RX and TX required for flow control"));
154+
mp_raise_ValueError(translate("Both RX and TX required for flow control"));
155155
}
156156

157157
// Filter for sane settings for RS485

0 commit comments

Comments
 (0)