File tree 1 file changed +10
-3
lines changed
rust-runtime/aws-smithy-types/src/error
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -10,10 +10,17 @@ use std::fmt;
10
10
11
11
/// Provides a `Display` impl for an `Error` that outputs the full error context
12
12
///
13
- /// This is useful for emitting errors with `tracing` in cases where the error
14
- /// is not returned back to the customer.
13
+ /// This utility follows the error cause/source chain and displays every error message
14
+ /// in the chain separated by ": ". At the end of the chain, it outputs a debug view
15
+ /// of the entire error chain.
16
+ ///
17
+ // Internally in the SDK, this is useful for emitting errors with `tracing` in cases
18
+ // where the error is not returned back to the customer.
15
19
#[ derive( Debug ) ]
16
- pub struct DisplayErrorContext < E : Error > ( pub E ) ;
20
+ pub struct DisplayErrorContext < E : Error > (
21
+ /// The error to display full context for
22
+ pub E ,
23
+ ) ;
17
24
18
25
impl < E : Error > fmt:: Display for DisplayErrorContext < E > {
19
26
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
You can’t perform that action at this time.
0 commit comments