MCPcopy Create free account
hub / github.com/apache/datafusion / strip_backtrace

Method strip_backtrace

datafusion/common/src/error.rs:466–474  ·  view source on GitHub ↗

Strips backtrace out of the error message If backtrace enabled then error has a format "message" [`Self::BACK_TRACE_SEP`] "backtrace" The method strips the backtrace and outputs "message"

(&self)

Source from the content-addressed store, hash-verified

464 /// If backtrace enabled then error has a format "message" [`Self::BACK_TRACE_SEP`] "backtrace"
465 /// The method strips the backtrace and outputs "message"
466 pub fn strip_backtrace(&self) -> String {
467 (*self
468 .to_string()
469 .split(Self::BACK_TRACE_SEP)
470 .collect::<Vec<&str>>()
471 .first()
472 .unwrap_or(&""))
473 .to_string()
474 }
475
476 /// To enable optional rust backtrace in DataFusion:
477 /// - [`Setup Env Variables`]<https://doc.rust-lang.org/std/backtrace/index.html#environment-variables>

Calls 3

to_stringMethod · 0.45
firstMethod · 0.45
splitMethod · 0.45