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)
| 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> |