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

PAnic vs return nil in validate function #377

Closed
akvlad opened this issue Oct 26, 2023 · 2 comments
Closed

PAnic vs return nil in validate function #377

akvlad opened this issue Oct 26, 2023 · 2 comments

Comments

@akvlad
Copy link

akvlad commented Oct 26, 2023

Hello.
I'm trying to build the participle library inside a wasm app.
Among some "avoidable" minor issues I have noticed issue with panic("done") inside the validate function
https://github.com/alecthomas/participle/blob/master/validate.go#L45
Somehow tiny-go doesn't process the deferred recover() call in this case.
Can it be replace with return nil ?

@alecthomas
Copy link
Owner

Possibly. If the tests pass it should be fine.

@alecthomas
Copy link
Owner

Closing this, no PR.

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

2 participants