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

Misusing the proc macros gives poor error messages #122

Closed
Demi-Marie opened this issue Jun 10, 2020 · 3 comments · Fixed by #123
Closed

Misusing the proc macros gives poor error messages #122

Demi-Marie opened this issue Jun 10, 2020 · 3 comments · Fixed by #123

Comments

@Demi-Marie
Copy link
Contributor

Misusing the proc macros results in very unhelpful error messages. I have seen:

  • Unwrapping None
  • Undefined variables with no explanation
  • Probably others

Furthermore, the correct use of the proc macros is poorly documented. I had to figure it out by trial and error.

@dvc94ch
Copy link
Contributor

dvc94ch commented Jun 10, 2020

Can you elaborate on what kind of documentation would be useful to you and how the error messages can be improved? Contributions are welcome.

@Demi-Marie
Copy link
Contributor Author

I would love to improve this, but probably will not be able to until Ledgeracio is finished.

@dvc94ch
Copy link
Contributor

dvc94ch commented Jun 17, 2020

the proc-macro-error crate is nice. I used it in a proc-macro today, really makes for a better ux. it should be easy to move to start using it, just replace panic! with abort! and unwrap with unwrap_or_else(|| abort!)

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

Successfully merging a pull request may close this issue.

2 participants