about summary refs log tree commit diff
path: root/src/libstd/rt
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2014-01-02 18:39:51 -0800
committerBrian Anderson <banderson@mozilla.com>2014-01-02 18:46:29 -0800
commit649c648d6f0627df9ac272b1505e363c7dbd656f (patch)
tree4678023fef48d87b0b7b06bcd39e9ac88df7fc7e /src/libstd/rt
parent27ce4d3f79cdc021a6bfe0f7009977e07a368770 (diff)
downloadrust-649c648d6f0627df9ac272b1505e363c7dbd656f.tar.gz
rust-649c648d6f0627df9ac272b1505e363c7dbd656f.zip
Abort on double-failure. #910
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.
Diffstat (limited to 'src/libstd/rt')
-rw-r--r--src/libstd/rt/unwind.rs8
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();
             }
         }