David Tolnay
526b677eff
Add reminder about html_root_url
2019-10-08 02:07:54 -07:00
David Tolnay
6cd9ea7666
Raise minimum supported rustc version to 1.34
2019-10-08 02:07:04 -07:00
David Tolnay
240cc8317b
Merge pull request #8 from dtolnay/option
...
Support context on Option
2019-10-08 02:04:09 -07:00
David Tolnay
42e5c93810
No need for object_raw, object_mut_raw to be unsafe
2019-10-08 01:34:00 -07:00
David Tolnay
aa2d08087c
Support context on Option
2019-10-08 01:27:18 -07:00
David Tolnay
c06155e5fb
Capture backtraces earlier
2019-10-08 01:21:28 -07:00
David Tolnay
310dec9efc
Introduce safe from_std and matching from_adhoc
2019-10-08 01:21:08 -07:00
David Tolnay
2a9e5b6ca3
Format with rustfmt 2019-09-08
2019-10-08 01:20:01 -07:00
David Tolnay
db2a298dc9
Change Error::construct to unsafe fn because TypeId must be correct
2019-10-08 01:06:36 -07:00
David Tolnay
eaa819d028
Move Error::new backtrace capture to backtrace_if_absent macro
2019-10-08 01:06:35 -07:00
David Tolnay
ebd9101bd7
Move backtrace capture to backtrace module and macro
2019-10-08 01:06:35 -07:00
David Tolnay
29f9375aee
Format with rustfmt 2019-09-08
2019-10-08 00:49:02 -07:00
David Tolnay
2c7d3cae75
Change Error::from calls to Error::new to cut one level of noise from backtraces
2019-10-08 00:03:19 -07:00
David Tolnay
4a350f9d15
Release 1.0.2
2019-10-07 23:20:39 -07:00
David Tolnay
03ef684ba1
Rename source to object in vtable
...
Since these function pointers have nothing to do with Error::source.
2019-10-07 23:16:10 -07:00
David Tolnay
8220e0a3c4
Merge pull request #5 from johnschug/master
...
Fix potential UB by removing reliance on trait object layout
2019-10-07 23:12:43 -07:00
John Schug
92bfd6f366
Fix potential UB by removing reliance on trait object layout
...
Adds a raw vtable object (similar to `RawWakerVTable`) that is manually
created and has methods to dynamically cast to `dyn StdError`.
2019-10-07 22:58:35 -07:00
David Tolnay
8571666481
Release 1.0.1
2019-10-07 13:48:31 -07:00
David Tolnay
28908f4b21
Touch up ensure macro documentation
2019-10-07 13:47:06 -07:00
David Tolnay
c5e1ca0e04
Remove unneeded parens in ensure macro
2019-10-07 13:44:13 -07:00
David Tolnay
dd1876cb32
Move macro tests to tests directory
2019-10-07 13:43:53 -07:00
David Tolnay
541b275508
Merge pull request 2 from EmbarkStudios/bail-single-str
2019-10-07 13:38:04 -07:00
David Tolnay
abcb255ebb
Merge pull request #4 from EmbarkStudios/ensure
...
Add ensure macro
2019-10-07 13:25:49 -07:00
David Tolnay
dcb6b794cc
Merge pull request #3 from dtolnay/literal
...
Accept string literal in bail macro
2019-10-07 13:21:37 -07:00
Johan Andersson
a1306a2323
Add ensure macro.
...
Fix #1 .
2019-10-07 22:19:37 +02:00
David Tolnay
08b3d5d42b
Accept string literal in bail macro
2019-10-07 13:16:30 -07:00
Johan Andersson
9c6fe3225a
Fix bail with single str parameter.
...
This was resulting in a missing From conversion, so now just use the anyhow macro also for single parameter bail.
Also added small test to verify that that it compiles.
2019-10-07 22:05:20 +02:00
David Tolnay
6fa503dff5
Show supported compiler version in readme
2019-10-07 08:54:05 -07:00
David Tolnay
0193d0cc84
Add comparison to failure crate
2019-10-07 08:25:15 -07:00
David Tolnay
4920eb98b2
Raise minimum supported rustc version to 1.32
...
For the $(...)? specifier in macros.
2019-10-07 08:00:11 -07:00
David Tolnay
3d65a7849c
Release 1.0.0
2019-10-07 07:55:24 -07:00
David Tolnay
b0c8c75766
Omit '0:' if only one cause
2019-10-06 17:02:43 -04:00
David Tolnay
ad275d587f
Indent causes in Debug representation with spaces
2019-10-06 17:00:48 -04:00
David Tolnay
a97f8dc3eb
Capitalize lines of Debug representation
2019-10-06 16:59:51 -04:00
David Tolnay
feb9f33dde
Add example to Chain iterator
2019-10-06 16:13:19 -04:00
David Tolnay
d159b79a63
Add example of Error::chain
2019-10-06 16:10:37 -04:00
David Tolnay
896dd7abb8
Explain the purpose of Error::context
2019-10-06 16:06:19 -04:00
David Tolnay
1ea72bbde3
Add Error::root_cause accessor
2019-10-06 15:55:02 -04:00
David Tolnay
0c21b7a336
Add example to Error::downcast_ref
2019-10-06 15:50:22 -04:00
David Tolnay
8235aa94b3
Call out that returning anyhow::Result from main is ok
2019-10-06 15:45:56 -04:00
David Tolnay
bab03c1840
Document Context trait with example
2019-10-06 15:42:56 -04:00
David Tolnay
a65335170e
Document anyhow macro with example
2019-10-06 15:34:01 -04:00
David Tolnay
5bbb899cc6
Document bail macro with examples
2019-10-06 13:20:32 -04:00
David Tolnay
511886e48f
Support string interpolation in bail macro
2019-10-06 13:06:08 -04:00
David Tolnay
d06569dfed
Document anyhow::Result with example
2019-10-06 13:03:01 -04:00
David Tolnay
55181d5bc4
Set html_root_url
2019-10-06 12:59:59 -04:00
David Tolnay
17cd390308
Simplify handling of trailing commas
2019-10-06 12:59:11 -04:00
David Tolnay
efce155177
Include example of anyhow! macro
2019-10-06 12:57:14 -04:00
David Tolnay
c0db22416a
No longer identical
2019-10-06 12:57:07 -04:00
David Tolnay
11a95ca5b0
Link to err-derive crate
2019-10-06 12:57:06 -04:00