summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/usart.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-04-05 18:32:08 +0100
committerDamien George <damien.p.george@gmail.com>2014-04-05 18:32:08 +0100
commitea13f407a392593e7746131952a57bad222ee882 (patch)
tree240fb586f678808bb5039a22e06a6214408adfc3 /stmhal/usart.c
parent2a037408af77d4c9e9cc98f5f12ea77fab93cc0e (diff)
downloadmicropython-ea13f407a392593e7746131952a57bad222ee882.tar.gz
micropython-ea13f407a392593e7746131952a57bad222ee882.zip
py: Change nlr_jump to nlr_raise, to aid in debugging.
This does not affect code size or performance when debugging turned off. To address issue #420.
Diffstat (limited to 'stmhal/usart.c')
-rw-r--r--stmhal/usart.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/stmhal/usart.c b/stmhal/usart.c
index 9bcc6be280..3cf8da6deb 100644
--- a/stmhal/usart.c
+++ b/stmhal/usart.c
@@ -145,7 +145,7 @@ STATIC void usart_obj_print(void (*print)(void *env, const char *fmt, ...), void
STATIC mp_obj_t usart_obj_make_new(mp_obj_t type_in, uint n_args, uint n_kw, const mp_obj_t *args) {
// check arguments
if (!(n_args == 2 && n_kw == 0)) {
- nlr_jump(mp_obj_new_exception_msg(&mp_type_ValueError, "Usart accepts 2 arguments"));
+ nlr_raise(mp_obj_new_exception_msg(&mp_type_ValueError, "Usart accepts 2 arguments"));
}
if (mp_obj_get_int(args[0]) > PYB_USART_MAX) {