Adding a small explanations on hardware exceptions vs software exceptions

Open
#312 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
55/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Stale
Tech stack
rust

Research direction

Open the exceptions chapter at the linked URL and locate the first paragraph under the hardware exceptions section. Add the proposed explanation directly after it, preserving the Rust and Result links, and verify that the rendered text clearly distinguishes hardware exceptions from software error handling.

Written by the indexing model from the issue text.

Description

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>, 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.

Dominant language
No language data
Stars
1.3k
Forks
223
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rust-embedded/book

All issues in rust-embedded/book

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.