Skip to content

Releases: dtolnay/thiserror

1.0.33

31 Aug 02:13
1.0.33
fdb266a
Compare
Choose a tag to compare

1.0.32

03 Aug 03:48
1.0.32
8cb98af
Compare
Choose a tag to compare
  • Add keywords to crates.io metadata

1.0.31

30 Apr 21:37
1.0.31
cbe8212
Compare
Choose a tag to compare
  • Improve diagnostic when there is an enum variant containing #[from] #[backtrace] Error, Backtrace (#163)

1.0.30

09 Oct 00:54
1.0.30
672e952
Compare
Choose a tag to compare
  • Make #[source] attribute usable on a field of type Box<dyn Error + Send + Sync + UnwindSafe + 'static> (#155, thanks @cosmicexplorer)

1.0.29

05 Sep 04:08
1.0.29
c7dd271
Compare
Choose a tag to compare
  • Support error types containing generic type parameters (#148, #149, #150, #151)

    use thiserror::Error;
    
    #[derive(Error, Debug)]
    pub enum MyError<E, F, G> {
        #[error("thing {0} ({0:?})")]
        Variant(E),
        #[error("some error")]
        Delegate(#[source] SomeError<F>),
        #[error("err 0o{val:o}")]
        Octal { val: G },
    }

    In the above example, thiserror would automatically generate the following pair of generic trait impls.

    impl<E, F, G> std::error::Error for MyError<E, F, G>
    where
        SomeError<F>: std::error::Error + 'static,
        Self: std::fmt::Debug + std::fmt::Display;
    
    impl<E, F, G> std::fmt::Display for MyError<E, F, G>
    where
        E: std::fmt::Debug + std::fmt::Display,
        G: std::fmt::Octal;

1.0.28

28 Aug 23:08
1.0.28
b47c75d
Compare
Choose a tag to compare
  • Make ? work with error types that hold an optional source (#147)

1.0.27

28 Aug 21:19
1.0.27
b087faf
Compare
Choose a tag to compare
  • Support forwarding backtrace method to source's backtrace method (#137, #146, thanks @astraw)

1.0.26

03 Jul 04:13
1.0.26
031fea6
Compare
Choose a tag to compare

1.0.25

22 May 21:34
1.0.25
19cb5ce
Compare
Choose a tag to compare
  • Support error(transparent) on errors containing a non-'static inner error (#113)

1.0.24

19 Feb 04:28
1.0.24
1b0a849
Compare
Choose a tag to compare