MCPcopy Create free account
hub / github.com/PRQL/prql / backtrace_enabled

Function backtrace_enabled

prqlc/prqlc/src/cli/mod.rs:65–73  ·  view source on GitHub ↗

Copied from https://doc.rust-lang.org/src/std/backtrace.rs.html#1-504, since it's private

()

Source from the content-addressed store, hash-verified

63 // Copied from
64 // https://doc.rust-lang.org/src/std/backtrace.rs.html#1-504, since it's private
65 fn backtrace_enabled() -> bool {
66 match env::var("RUST_LIB_BACKTRACE") {
67 Ok(s) => s != "0",
68 Err(_) => match env::var("RUST_BACKTRACE") {
69 Ok(s) => s != "0",
70 Err(_) => false,
71 },
72 }
73 }
74 if backtrace_enabled() {
75 eprintln!("{:#}", error.backtrace());
76 }

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected