txlyre 5 天之前
父节点
当前提交
2f0c327b23
共有 1 个文件被更改,包括 3 次插入3 次删除
  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));
     scope = qi_list_index(state->scopes, -((qi_ssize_t)offset));
 
 
     if (!scope)
     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));
                      qi_repr(state, c, true));
   }
   }
   else
   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));
     scope = qi_list_index(state->scopes, -((qi_ssize_t)offset));
 
 
     if (!scope)
     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));
                      qi_repr(state, b, true));
   }
   }
   else
   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));
     scope = qi_list_index(state->scopes, -((qi_ssize_t)offset));
 
 
     if (!scope)
     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));
                      qi_repr(state, b, true));
   }
   }
   else
   else