Skip to content

Commit

Permalink
Merge pull request #703 from squidpickles/optional-backtrace
Browse files Browse the repository at this point in the history
Update to error-chain 0.5.0 to allow optional backtrace. #591
  • Loading branch information
brson authored Sep 30, 2016
2 parents 78482c7 + 038286e commit 1a4bbe9
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 16 deletions.
20 changes: 11 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ msi-installed = []
rustup-dist = { path = "src/rustup-dist", version = "0.6.3" }
rustup-utils = { path = "src/rustup-utils", version = "0.6.3" }
download = { path = "src/download" }
error-chain = "0.4.0"
error-chain = "0.5.0"
clap = "2.2.4"
regex = "0.1.41"
url = "1.1.0"
Expand Down
2 changes: 1 addition & 1 deletion src/download/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ hyper-backend = ["hyper", "env_proxy", "native-tls", "openssl-sys"]
rustls-backend = ["hyper", "env_proxy", "rustls", "lazy_static", "ca-loader"]

[dependencies]
error-chain = "0.4.0"
error-chain = "0.5.0"
url = "1.1"
curl = { version = "0.3", optional = true }
lazy_static = { version = "0.2", optional = true }
Expand Down
8 changes: 5 additions & 3 deletions src/rustup-cli/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,9 +353,11 @@ pub fn report_error(e: &Error) {
}

if show_backtrace() {
info!("backtrace:");
println!("");
println!("{:?}", e.backtrace());
if let Some(backtrace) = e.backtrace() {
info!("backtrace:");
println!("");
println!("{:?}", backtrace);
}
} else {
}

Expand Down
2 changes: 1 addition & 1 deletion src/rustup-dist/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ walkdir = "0.1.5"
toml = "0.1.27"
sha2 = "0.1.2"
rustup-utils = { path = "../rustup-utils", version = "0.6.3" }
error-chain = "0.4.0"
error-chain = "0.5.0"
rustup-mock = { path = "../rustup-mock", version = "0.6.3" }

[target."cfg(windows)".dependencies]
Expand Down
2 changes: 1 addition & 1 deletion src/rustup-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ license = "MIT OR Apache-2.0"
[dependencies]
rand = "0.3.11"
scopeguard = "0.1.2"
error-chain = "0.4.0"
error-chain = "0.5.0"
libc = "0.2.0"
rustc-serialize = "0.3.19"
sha2 = "0.1.2"
Expand Down

0 comments on commit 1a4bbe9

Please sign in to comment.