all: Make more use of mp_raise_{msg,TypeError,ValueError} helpers.

This commit is contained in:
Damien George
2017-06-15 11:54:41 +10:00
parent 1e70fda69f
commit 48d867b4a6
17 changed files with 33 additions and 37 deletions

View File

@@ -230,8 +230,7 @@ STATIC void do_load(mp_obj_t module_obj, vstr_t *file) {
#endif
// If we get here then the file was not frozen and we can't compile scripts.
nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_ImportError,
"script compilation not supported"));
mp_raise_msg(&mp_type_ImportError, "script compilation not supported");
}
STATIC void chop_component(const char *start, const char **end) {