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

Exception in doc #60

Closed
hellow554 opened this issue Feb 11, 2019 · 3 comments
Closed

Exception in doc #60

hellow554 opened this issue Feb 11, 2019 · 3 comments
Labels
documentation Issues and improvements sorrounding the documentation

Comments

@hellow554
Copy link

hellow554 commented Feb 11, 2019

https://github.com/brycx/orion/blob/f5db759f157921c31c571868757900eedd2bcdcf/src/aead.rs#L48-L57

I do not like the word "Exception" here, because Rust doesn't have the term exception in its library, in contrast to other languages, e.g. C#, Java, C++, ...

The Rust documentation ueses the word "Panics" when it will panic under certain conditions (e.g. u32::overflowing_div).

I would suggest to adopt the phrasing.

@brycx
Copy link
Member

brycx commented Feb 11, 2019

You're right that "Exception" probably isn't the correct phrasing. However, those items listed under "Exceptions" are conditions that, when met, will cause the function to return an Err and not directly cause a panic. Perhaps rephrasing to "Errors" would be the most appropriate?

@brycx brycx added the documentation Issues and improvements sorrounding the documentation label Feb 11, 2019
@hellow554
Copy link
Author

Errors sounds fine to me.

You want to rephrase the next sentence then to

An error will be returned if

@brycx
Copy link
Member

brycx commented Feb 11, 2019

Great! Thank you for the issue @hellow554!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Issues and improvements sorrounding the documentation
Projects
None yet
Development

No branches or pull requests

2 participants