about summary refs log tree commit diff
path: root/src/libstd/panicking.rs
AgeCommit message (Collapse)AuthorLines
2016-01-13Add missing newline character to callers of dumb_printAmanieu d'Antras-2/+2
2015-12-23Implement custom panic handlersSteven Fackler-8/+148
2015-09-24Abort earlier upon multi-panicsAndrea Canciani-1/+11
The double-panic `abort` is run after the logging code, to provide feedback in case of a double-panic. This means that if the panic logging fails with a panic, the `abort` might never be reached. This should not normally occur, but if the `on_panic` function detects more than 2 panics, aborting *before* logging makes panic handling somewhat more robust, as it avoids an infinite recursion, which would eventually crash the process, but also make the problem harder to debug. This handles the FIXME about what to do if the thread printing panics.
2015-09-24Explicitly count the number of panicsAndrea Canciani-2/+22
Move the panic handling logic from the `unwind` module to `panicking` and use a panic counter to distinguish between normal state, panics and double panics.
2015-09-24Separate panic logging codeAndrea Canciani-22/+19
Move the panic logging code to a function separate from `on_panic` and simplify the code to decide whether the backtrace should be logged.
2015-09-11std: Internalize almost all of `std::rt`Alex Crichton-1/+2
This commit does some refactoring to make almost all of the `std::rt` private. Specifically, the following items are no longer part of its API: * DEFAULT_ERROR_CODE * backtrace * unwind * args * at_exit * cleanup * heap (this is just alloc::heap) * min_stack * util The module is now tagged as `#[doc(hidden)]` as the only purpose it's serve is an entry point for the `panic!` macro via the `begin_unwind` and `begin_unwind_fmt` reexports.
2015-06-20Fix logic in panic printing with no stderrSteven Fackler-11/+12
If a local stderr is present but the normal stderr is missing, we still want to print.
2015-06-17std: Split the `std_misc` featureAlex Crichton-2/+0
2015-06-14Implement RFC 1014Steven Fackler-1/+4
Closes #25977 The various `stdfoo_raw` methods in std::io now return `io::Result`s, since they may not exist on Windows. They will always return `Ok` on Unix-like platforms. [breaking-change]
2015-04-27std: Don't assume thread::current() works on panicAlex Crichton-3/+3
Inspecting the current thread's info may not always work due to the TLS value having been destroyed (or is actively being destroyed). The code for printing a panic message assumed, however, that it could acquire the thread's name through this method. Instead this commit propagates the `Option` outwards to allow the `std::panicking` module to handle the case where the current thread isn't present. While it solves the immediate issue of #24313, there is still another underlying issue of panicking destructors in thread locals will abort the process. Closes #24313
2015-04-21Remove references to `old_{path,io}`Tamir Duberstein-1/+0
2015-04-11Change the rt::unwind line argument type from usize to u32.Ryan Prichard-1/+1
2015-03-13Fallout of std::old_io deprecationAlex Crichton-12/+5
2015-02-18Replace all uses of `&foo[]` with `&foo[..]` en masse.Niko Matsakis-1/+1
2015-02-17Fallout from stabilizationAaron Turon-2/+2
2015-02-13Rename std::failure to std::panickingKevin Yap-0/+76
Closes #22306.