diff options
| author | bors <bors@rust-lang.org> | 2014-01-04 00:32:09 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-01-04 00:32:09 -0800 |
| commit | 239fb1f6ee3af1e9b5d5372a9edb2bb1de07e451 (patch) | |
| tree | 639137f136a0bbfe21192a2eb524a1d5771d5427 /src/libstd | |
| parent | 3dd7c49faf5ae3a9158ab242a264c0f0eb99f657 (diff) | |
| parent | 649c648d6f0627df9ac272b1505e363c7dbd656f (diff) | |
| download | rust-239fb1f6ee3af1e9b5d5372a9edb2bb1de07e451.tar.gz rust-239fb1f6ee3af1e9b5d5372a9edb2bb1de07e451.zip | |
auto merge of #11283 : brson/rust/doublefailure, r=alexcrichton
Previously this was an `rtabort!`, indicating a runtime bug. Promote this to a more intentional abort and print a (slightly) more informative error message. Can't test this sense our test suite can't handle an abort exit. I consider this to close #910, and that we should open another issue about implementing less conservative semantics here.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/rt/unwind.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libstd/rt/unwind.rs b/src/libstd/rt/unwind.rs index 358df7260f4..6be4ab97ee3 100644 --- a/src/libstd/rt/unwind.rs +++ b/src/libstd/rt/unwind.rs @@ -354,7 +354,13 @@ pub fn begin_unwind<M: Any + Send>(msg: M, file: &'static str, line: uint) -> ! } if (*task).unwinder.unwinding { - rtabort!("unwinding again"); + // If a task fails while it's already unwinding then we + // have limited options. Currently our preference is to + // just abort. In the future we may consider resuming + // unwinding or otherwise exiting the task cleanly. + rterrln!("task failed during unwinding (double-failure - total drag!)") + rterrln!("rust must abort now. so sorry."); + intrinsics::abort(); } } |
