Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lua方法未找到会直接exit,影响app使用 #6

Closed
ChenMengqi opened this issue Aug 6, 2020 · 2 comments
Closed

lua方法未找到会直接exit,影响app使用 #6

ChenMengqi opened this issue Aug 6, 2020 · 2 comments

Comments

@ChenMengqi
Copy link
Collaborator

ChenMengqi commented Aug 6, 2020

void luaD_throw (lua_State *L, int errcode) {
  if (L->errorJmp) {
    L->errorJmp->status = errcode;
    LUAI_THROW(L, L->errorJmp);
  }
  else {
    L->status = cast_byte(errcode);
    if (G(L)->panic) {
      resetstack(L, errcode);
      lua_unlock(L);
      G(L)->panic(L);
    }
    exit(EXIT_FAILURE);
  }
}

期望能 回退 或者 不执行该方法,直接exit 不友好,热修复应该在release下稳定

@ChenMengqi
Copy link
Collaborator Author

lua_call 的调用 改成 lua_pcall 即可

@ChenMengqi
Copy link
Collaborator Author

lua_call 的调用 改成 lua_pcall 即可

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant