txlyre 5 giorni fa
parent
commit
2f0c327b23
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 3 3
      qirt.c

+ 3 - 3
qirt.c

@@ -4023,7 +4023,7 @@ qi_value_t *qi_builtin_set_global(qi_state_t *state, qi_size_t pargc,
     scope = qi_list_index(state->scopes, -((qi_ssize_t)offset));
 
     if (!scope)
-      qi_throw_class(state, state->valueerror, "illegal scope index: %s",
+      qi_throw_class(state, state->indexerror, "illegal scope index: %s",
                      qi_repr(state, c, true));
   }
   else
@@ -4088,7 +4088,7 @@ qi_value_t *qi_builtin_unset_global(qi_state_t *state, qi_size_t pargc,
     scope = qi_list_index(state->scopes, -((qi_ssize_t)offset));
 
     if (!scope)
-      qi_throw_class(state, state->valueerror, "illegal scope index: %s",
+      qi_throw_class(state, state->indexerror, "illegal scope index: %s",
                      qi_repr(state, b, true));
   }
   else
@@ -4148,7 +4148,7 @@ qi_value_t *qi_builtin_get_global(qi_state_t *state, qi_size_t pargc,
     scope = qi_list_index(state->scopes, -((qi_ssize_t)offset));
 
     if (!scope)
-      qi_throw_class(state, state->valueerror, "illegal scope index: %s",
+      qi_throw_class(state, state->indexerror, "illegal scope index: %s",
                      qi_repr(state, b, true));
   }
   else