David Tolnay
2d8d0aa02a
Implement Default for Chain to be an empty chain
2019-11-22 18:12:54 -08:00
David Tolnay
ca2b8b9bb0
Add a Chain::new constructor
2019-11-22 18:12:52 -08:00
David Tolnay
2c88164b5b
Add AsRef impls for Error
...
These are potentially friendlier than fiddling with &** to get the trait
object.
let _: &dyn StdError = error.as_ref();
2019-11-22 16:51:41 -08:00
David Tolnay
645a81c135
Remove stack backtrace disabled notice
...
This message ended up being too noisy. Applications that want to print a
notice like this can print it themselves.
2019-11-22 12:07:47 -08:00
David Tolnay
1790576a85
Release 1.0.22
2019-11-18 11:47:01 -08:00
David Tolnay
cb3c80cca7
Merge pull request #47 from dtolnay/anyhow
...
Handle anyhow::Error as argument to anyhow!()
2019-11-18 11:46:34 -08:00
David Tolnay
210e60a8c4
Handle anyhow::Error as argument to anyhow!()
2019-11-18 11:42:12 -08:00
David Tolnay
59fb765bab
Add test for anyhow from anyhow
2019-11-18 11:42:11 -08:00
David Tolnay
6088b60791
Fill in some explanations of unsafe code
...
Closes #14 .
2019-11-17 16:01:08 -08:00
David Tolnay
5ef79ebe3e
Allow Send and Sync autotraits to be inferred
2019-11-17 15:27:01 -08:00
David Tolnay
2bbf85abee
Release 1.0.21
2019-11-17 14:55:25 -08:00
David Tolnay
00545d5c0e
Merge pull request #45 from dtolnay/chain
...
Provide DoubleEndedIterator and ExactSizeIterator for anyhow::Chain
2019-11-17 14:54:17 -08:00
David Tolnay
9ef3d2debe
Add chain iterator test
2019-11-17 14:49:16 -08:00
David Tolnay
7c8064f6a6
Implement ExactSizeIterator for Chain
2019-11-17 14:41:23 -08:00
David Tolnay
a2caba0748
Implement DoubleEndedIterator for Chain
2019-11-17 14:41:23 -08:00
David Tolnay
a8c199b37d
Move Chain implementation to chain.rs
2019-11-17 14:41:23 -08:00
David Tolnay
7246344a3e
Remove unneeded take in Chain implementation
2019-11-17 14:40:56 -08:00
David Tolnay
0dca03d315
Release 1.0.20
2019-11-15 21:36:23 -08:00
David Tolnay
a2b3fbd41a
Line up altdisplay expected strings on one line
...
Rustfmt does not like how these were previously formatted and insisted
on doing:
const EXPECTED_ALTDISPLAY_G: &str = "\
f failed: oh no!\
";
which is worse.
2019-11-15 21:34:44 -08:00
David Tolnay
87e85abfd8
Use instrs.json as file path in examples
...
The jsox file extension was intended to imply that there had been a
typo, but it ended up being distracting.
2019-11-15 21:33:01 -08:00
David Tolnay
437c691d16
Capitalize example error messages
2019-11-15 21:33:01 -08:00
David Tolnay
74954bdbd7
Merge pull request #42 from dtolnay/fmt
...
Add and document {:#} and {:#?} alt format representations
2019-11-15 21:32:53 -08:00
David Tolnay
c30a32bdda
Render alt display on one line with colons
2019-11-15 21:25:40 -08:00
David Tolnay
bba67262ed
Test the alt format representations
2019-11-15 20:59:57 -08:00
David Tolnay
42d02866ee
Document all the display representations
2019-11-15 20:50:30 -08:00
David Tolnay
7da2a83336
Move error formatting to fmt.rs
2019-11-15 20:44:02 -08:00
David Tolnay
b1c7c7afb1
Implement alternate display format {:#}
2019-11-15 20:44:02 -08:00
David Tolnay
cba8b1fb47
Implement alternate debug format {:#?}
2019-11-15 20:44:02 -08:00
David Tolnay
d324d628f3
Add Clone impl for anyhow::Chain
2019-11-15 20:44:02 -08:00
David Tolnay
373930df3d
Update stack backtrace disabled notice
2019-11-15 20:44:02 -08:00
David Tolnay
68897dfeb2
Capitalize stack backtrace heading
2019-11-15 20:44:02 -08:00
David Tolnay
4e2dd07c8d
Remove redundant backtrace trailing newline
2019-11-15 20:44:02 -08:00
David Tolnay
04b11c5cf4
Add Error::msg constructor to simplify map_err combinators
2019-11-15 13:48:09 -08:00
David Tolnay
360c93a1fd
Release 1.0.19
2019-11-02 13:25:50 -07:00
David Tolnay
d6959993fa
Merge pull request #38 from dtolnay/format_err
...
Provide format_err macro
2019-11-02 13:25:25 -07:00
David Tolnay
bd0733fe02
Provide format_err macro
2019-11-02 13:22:06 -07:00
David Tolnay
791754e3c0
Add brief comparison with thiserror
2019-10-28 23:53:00 -07:00
David Tolnay
afa1a47f76
Release 1.0.18
2019-10-28 07:59:33 -07:00
David Tolnay
f721eec438
Remove fehler link
...
The Anyhow implementation has changed a lot and is now quite different
from der Fehler.
2019-10-28 07:57:44 -07:00
David Tolnay
8fcd8d015a
Merge pull request #34 from dtolnay/context
...
Support downcasting errors with context to C *or* E
2019-10-27 21:40:59 -07:00
David Tolnay
61ad446799
Document the interaction of context and downcast
2019-10-27 21:33:58 -07:00
David Tolnay
b9d69af29e
Add tests for downcasting context
2019-10-27 21:33:57 -07:00
David Tolnay
b119f4997f
Remove unneeded object_is vtable method
2019-10-27 21:33:57 -07:00
David Tolnay
fa36bac5b5
Rename the ErrorImpl tail to _object
...
Avoids _error.error repetition when manipulation ErrorImpl<ContextError>,
and works well with object_ref / object_mut naming in the vtable.
2019-10-27 21:33:57 -07:00
David Tolnay
6a25ac3692
Support downcasting ContextError<C, Error> to C and cause
2019-10-27 21:33:57 -07:00
David Tolnay
d84def42ce
Support downcasting ContextError<C, E> to C and E
2019-10-27 21:33:57 -07:00
David Tolnay
5d1e685152
Move downcasting into vtable
2019-10-27 21:21:01 -07:00
David Tolnay
5e04e776ef
Disable needless_doctest_main lint
2019-10-27 21:20:38 -07:00
David Tolnay
b2f0f456f5
Atomic flag type for use in Drop tests
2019-10-27 21:20:03 -07:00
David Tolnay
e674ddcf79
Put context first in the Debug impl for ContextError
2019-10-27 16:40:28 -07:00