Skip to content

Commit 6b30992

Browse files
authored
Add new chapter for Error Reporting (#21)
* Draft first part of error reporting * Finish drafting error reporting
1 parent d92dfdd commit 6b30992

File tree

5 files changed

+704
-6
lines changed

5 files changed

+704
-6
lines changed

Cargo.lock

Lines changed: 79 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ serde = {version = "1", features = ["derive"] }
99
itertools = "0.11.0"
1010
serde_json = "1"
1111
anyhow = "1"
12-
datetime = "0.5.2"
12+
datetime = "0.5.2"
13+
sha1 = "0.10.6"

content/SUMMARY.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@
2222

2323
- [Associated Types](associated-types.md)
2424
- [Error Handling](error-handling.md)
25-
- [Delegated Error Raiser](delegated-error-raiser.md)
26-
- [Detailed Error Reporting]()
25+
- [Delegated Error Raisers](delegated-error-raiser.md)
26+
- [Error Reporting](error-reporting.md)
27+
- [Wrapping Errors]()
2728
- [Component Presets]()
2829
- [Trait-Generic Providers]()
2930
- [`WithProvider`]()

content/delegated-error-raiser.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Delegated Error Raiser
1+
# Delegated Error Raisers
22

33
In the previous chapter, we have defined context-generic error raisers like `RaiseFrom`
44
and `DebugAsAnyhow`, which can be use to raise any source error that satisfy certain
@@ -13,7 +13,7 @@ For example, we may want to use `RaiseFrom` when there is a `From` instance, and
1313
In this chapter, we will cover the `UseDelegate` pattern, which offers a declarative
1414
way to handle errors differently depending on the source error type.
1515

16-
## Ad Hoc Error Raiser
16+
## Ad Hoc Error Raisers
1717

1818
One way that we can handle source errors differently is by defining an error raiser
1919
provider that has explicit implementation for each source error, such as follows:

0 commit comments

Comments
 (0)