Add option for printing full backtraces

This commit is contained in:
Manish Goregaokar 2016-04-02 05:56:41 +05:30
parent 1aa6d558ac
commit a2c82a03ba
2 changed files with 16 additions and 0 deletions

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use ipc_channel::ipc::IpcSender;
use opts;
use serde::Serialize;
use std::borrow::ToOwned;
use std::io::{Write, stderr};
@ -17,6 +18,11 @@ pub fn spawn_named<F>(name: String, f: F)
{
let builder = thread::Builder::new().name(name);
if opts::get().full_backtraces {
builder.spawn(f).unwrap();
return;
}
let f_with_handler = move || {
let hook = take_handler();