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

使用仓库出现 Context disposed error at com.quickjs.JSContext.checkReleased(JSContext.java:183) #28

Open
yangfeng1994 opened this issue Nov 3, 2023 · 1 comment

Comments

@yangfeng1994
Copy link

使用时,容易造成 Context disposed error ,必须每一行调用,都要判断一次,比较麻烦,并且抛的是Error,调用层无法去捕获进行处理,看代码里有如下,希望可以改为抛Exception ,方便使用者进行捕获操作
void checkReleased() { this.checkReleaseObjPtrPool(); if (this.isReleased()) { throw new Error("Context disposed error"); } }

@yangfeng1994
Copy link
Author

有好几处都是抛的Error,希望能全部改为Exception,不然出现这种问题,只能让应用崩溃,而束手无策

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