all: Make more use of mp_raise_{msg,TypeError,ValueError} helpers.
diff --git a/py/modmath.c b/py/modmath.c
index ddab337..1071323 100644
--- a/py/modmath.c
+++ b/py/modmath.c
@@ -25,7 +25,7 @@
  */
 
 #include "py/builtin.h"
-#include "py/nlr.h"
+#include "py/runtime.h"
 
 #if MICROPY_PY_BUILTINS_FLOAT && MICROPY_PY_MATH
 
@@ -41,7 +41,7 @@
 /// working with floating-point numbers.
 
 STATIC NORETURN void math_error(void) {
-    nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_ValueError, "math domain error"));
+    mp_raise_ValueError("math domain error");
 }
 
 #define MATH_FUN_1(py_name, c_name) \