This repository was archived by the owner on Aug 16, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -358,17 +358,15 @@ pub fn make_backtrace() -> Option<Arc<Backtrace>> {
358
358
}
359
359
}
360
360
361
- /// This trait is an implementation detail which must be implemented on each
362
- /// ErrorKind. We can't do it globally since each ErrorKind is different .
361
+ /// This trait is implemented on all the errors generated by the `error_chain`
362
+ /// macro .
363
363
pub trait ChainedError : error:: Error + Send + ' static {
364
364
/// Associated kind type.
365
365
type ErrorKind ;
366
366
/// Creates an error from it's parts.
367
367
fn new ( kind : Self :: ErrorKind , state : State ) -> Self ;
368
- /// Use downcasts to extract the backtrace from types we know,
369
- /// to avoid generating a new one. It would be better to not
370
- /// define this in the macro, but types need some additional
371
- /// machinery to make it work.
368
+ /// Returns the first known backtrace, either from it's State or from one
369
+ /// of the errors from `foreign_links`.
372
370
#[ cfg( feature = "backtrace" ) ]
373
371
fn extract_backtrace ( e : & ( error:: Error + Send + ' static ) )
374
372
-> Option < Option < Arc < Backtrace > > > ;
You can’t perform that action at this time.
0 commit comments