mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 20:20:14 +01:00
all: Use MP_ERROR_TEXT for all error messages.
This commit is contained in:
committed by
Damien George
parent
85858e72df
commit
def76fe4d9
@@ -235,7 +235,7 @@ STATIC mp_obj_t re_split(size_t n_args, const mp_obj_t *args) {
|
||||
mp_obj_t s = mp_obj_new_str_of_type(str_type, (const byte *)subj.begin, caps[0] - subj.begin);
|
||||
mp_obj_list_append(retval, s);
|
||||
if (self->re.sub > 0) {
|
||||
mp_raise_NotImplementedError("Splitting with sub-captures");
|
||||
mp_raise_NotImplementedError(MP_ERROR_TEXT("Splitting with sub-captures"));
|
||||
}
|
||||
subj.begin = caps[1];
|
||||
if (maxsplit > 0 && --maxsplit == 0) {
|
||||
@@ -403,7 +403,7 @@ STATIC mp_obj_t mod_re_compile(size_t n_args, const mp_obj_t *args) {
|
||||
int error = re1_5_compilecode(&o->re, re_str);
|
||||
if (error != 0) {
|
||||
error:
|
||||
mp_raise_ValueError("Error in regex");
|
||||
mp_raise_ValueError(MP_ERROR_TEXT("Error in regex"));
|
||||
}
|
||||
#if MICROPY_PY_URE_DEBUG
|
||||
if (flags & FLAG_DEBUG) {
|
||||
|
||||
Reference in New Issue
Block a user