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

remove panic on unknown discriminator #27

Closed
derkbell opened this issue Nov 29, 2021 · 1 comment
Closed

remove panic on unknown discriminator #27

derkbell opened this issue Nov 29, 2021 · 1 comment

Comments

@derkbell
Copy link

This panic line caused one of our production systems to crash when trying to decode messages on a noisy channel.

_ => panic!("unknown discriminator"), // FIXME: this should not be a panic

Now, I'm happy to fix this and submit a pull request but how? Because this is part of the derived parcel implementation, I'm not sure what the generated code ends up looking like or what can be returned here to replace the panic

@derkbell
Copy link
Author

Can it just return some protocol::Error instead of panic?

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