You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What about adding, directly after the first paragraph:
Hardware exceptions are different from exceptions thrown in software, which are a way of handling errors for both recoverable and unrecoverable errors. For recoverable error handling, Rust uses the Result type Result<T, E>, where T is the Ok value type, and E is a specific, configurable error. For unrecoverable software error handling, Rust uses panic that stops execution. This is closer to exceptions thrown in software using other languages.
If you think it can be a useful addition I can make a PR.
The text was updated successfully, but these errors were encountered:
In the book there is a paragraph on hardware exceptions:
https://docs.rust-embedded.org/book/start/exceptions.html?highlight=exception#the-default-exception-handler
This can be a question mark for people used to software exceptions.
What about adding, directly after the first paragraph:
Hardware exceptions are different from exceptions thrown in software, which are a way of handling errors for both recoverable and unrecoverable errors. For recoverable error handling, Rust uses the Result type
Result<T, E>
, whereT
is theOk
value type, andE
is a specific, configurable error. For unrecoverable software error handling, Rust usespanic
that stops execution. This is closer to exceptions thrown in software using other languages.If you think it can be a useful addition I can make a PR.
The text was updated successfully, but these errors were encountered: