Struct zng_app::crash_handler::CrashError
source · pub struct CrashError {
pub timestamp: SystemTime,
pub code: Option<i32>,
pub signal: Option<i32>,
pub stdout: Txt,
pub stderr: Txt,
pub args: Box<[Txt]>,
pub minidump: Option<PathBuf>,
pub os: Txt,
}
Expand description
Info about an app-process crash.
Fields§
§timestamp: SystemTime
Crash moment.
code: Option<i32>
Process exit code.
signal: Option<i32>
Unix signal that terminated the process.
stdout: Txt
Full capture of the app stdout.
stderr: Txt
Full capture of the app stderr.
args: Box<[Txt]>
Arguments used.
minidump: Option<PathBuf>
Minidump file.
os: Txt
Operating system.
See std::env::consts::OS
for details.
Implementations§
source§impl CrashError
impl CrashError
sourcepub fn is_stdout_plain(&self) -> bool
pub fn is_stdout_plain(&self) -> bool
Gets if stdout
does not contain any ANSI scape sequences.
sourcepub fn is_stderr_plain(&self) -> bool
pub fn is_stderr_plain(&self) -> bool
Gets if stderr
does not contain any ANSI scape sequences.
sourcepub fn stdout_plain(&self) -> Txt
pub fn stdout_plain(&self) -> Txt
Get stdout
without any ANSI escape sequences (CSI).
sourcepub fn stderr_plain(&self) -> Txt
pub fn stderr_plain(&self) -> Txt
Get stderr
without any ANSI escape sequences (CSI).
sourcepub fn has_panic_widget(&self) -> bool
pub fn has_panic_widget(&self) -> bool
Gets if stderr
contains a crash panic that traced widget/window path.
sourcepub fn find_panic(&self) -> Option<CrashPanic>
pub fn find_panic(&self) -> Option<CrashPanic>
Try parse stderr
for the crash panic.
Only reliably works if the panic fully printed correctly and was formatted by the panic
hook installed by crash_handler
or by the display print of CrashPanic
.
Trait Implementations§
source§impl Clone for CrashError
impl Clone for CrashError
source§fn clone(&self) -> CrashError
fn clone(&self) -> CrashError
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CrashError
impl Debug for CrashError
source§impl<'de> Deserialize<'de> for CrashError
impl<'de> Deserialize<'de> for CrashError
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl Display for CrashError
impl Display for CrashError
Alternate mode {:#}
prints plain stdout and stderr (no ANSI escape sequences).
Auto Trait Implementations§
impl Freeze for CrashError
impl RefUnwindSafe for CrashError
impl Send for CrashError
impl Sync for CrashError
impl Unpin for CrashError
impl UnwindSafe for CrashError
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more