all: Raise exceptions via mp_raise_XXX
- Changed: ValueError, TypeError, NotImplementedError
- OSError invocations unchanged, because the corresponding utility
function takes ints, not strings like the long form invocation.
- OverflowError, IndexError and RuntimeError etc. not changed for now
until we decide whether to add new utility functions.
This commit is contained in:
@@ -92,7 +92,7 @@ STATIC mp_obj_t decompio_make_new(const mp_obj_type_t *type, size_t n_args, size
|
||||
dict_opt = uzlib_zlib_parse_header(&o->decomp);
|
||||
if (dict_opt < 0) {
|
||||
header_error:
|
||||
nlr_raise(mp_obj_new_exception_msg(&mp_type_ValueError, "compression header"));
|
||||
mp_raise_ValueError("compression header");
|
||||
}
|
||||
dict_sz = 1 << dict_opt;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user