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

Support safe mode #9

Open
moteus opened this issue Dec 27, 2016 · 2 comments
Open

Support safe mode #9

moteus opened this issue Dec 27, 2016 · 2 comments

Comments

@moteus
Copy link
Contributor

moteus commented Dec 27, 2016

I prefer if function returns error instead raise Lua errors.
E.g. if i get info from untrasted source I want return either info or error message.
Now I have to use pcall for such thing.
I like way how it was implemented in cjson library.
It just provide 2 module cjson and cjson.safe.

@daurnimator
Copy link
Owner

I agree. Happy to add functions that return nil, err, errno and keep old constructor for compatibility

@daurnimator daurnimator mentioned this issue Dec 28, 2016
@daurnimator
Copy link
Owner

Let me know what you think of #10. Pick me some better function names if you can :)

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

No branches or pull requests

2 participants