pub enum CrashReason {
Show 33 variants MacGeneral(ExceptionCodeMac, u32), MacBadAccessKern(ExceptionCodeMacBadAccessKernType), MacBadAccessArm(ExceptionCodeMacBadAccessArmType), MacBadAccessPpc(ExceptionCodeMacBadAccessPpcType), MacBadAccessX86(ExceptionCodeMacBadAccessX86Type), MacBadInstructionArm(ExceptionCodeMacBadInstructionArmType), MacBadInstructionPpc(ExceptionCodeMacBadInstructionPpcType), MacBadInstructionX86(ExceptionCodeMacBadInstructionX86Type), MacArithmeticArm(ExceptionCodeMacArithmeticArmType), MacArithmeticPpc(ExceptionCodeMacArithmeticPpcType), MacArithmeticX86(ExceptionCodeMacArithmeticX86Type), MacSoftware(ExceptionCodeMacSoftwareType), MacBreakpointArm(ExceptionCodeMacBreakpointArmType), MacBreakpointPpc(ExceptionCodeMacBreakpointPpcType), MacBreakpointX86(ExceptionCodeMacBreakpointX86Type), MacResource(ExceptionCodeMacResourceType, u64, u64), MacGuard(ExceptionCodeMacGuardType, u64, u64), LinuxGeneral(ExceptionCodeLinux, u32), LinuxSigill(ExceptionCodeLinuxSigillKind), LinuxSigtrap(ExceptionCodeLinuxSigtrapKind), LinuxSigbus(ExceptionCodeLinuxSigbusKind), LinuxSigfpe(ExceptionCodeLinuxSigfpeKind), LinuxSigsegv(ExceptionCodeLinuxSigsegvKind), LinuxSigsys(ExceptionCodeLinuxSigsysKind), WindowsGeneral(ExceptionCodeWindows), WindowsWinError(WinErrorWindows), WindowsWinErrorWithFacility(WinErrorFacilityWindows, WinErrorWindows), WindowsNtStatus(NtStatusWindows), WindowsAccessViolation(ExceptionCodeWindowsAccessType), WindowsInPageError(ExceptionCodeWindowsInPageErrorType, u64), WindowsStackBufferOverrun(u64), WindowsUnknown(u32), Unknown(u32, u32),
}
Expand description

The reason for a process crash.

Variants§

§

MacGeneral(ExceptionCodeMac, u32)

A Mac/iOS error code with no other interesting details.

§

MacBadAccessKern(ExceptionCodeMacBadAccessKernType)

§

MacBadAccessArm(ExceptionCodeMacBadAccessArmType)

§

MacBadAccessPpc(ExceptionCodeMacBadAccessPpcType)

§

MacBadAccessX86(ExceptionCodeMacBadAccessX86Type)

§

MacBadInstructionArm(ExceptionCodeMacBadInstructionArmType)

§

MacBadInstructionPpc(ExceptionCodeMacBadInstructionPpcType)

§

MacBadInstructionX86(ExceptionCodeMacBadInstructionX86Type)

§

MacArithmeticArm(ExceptionCodeMacArithmeticArmType)

§

MacArithmeticPpc(ExceptionCodeMacArithmeticPpcType)

§

MacArithmeticX86(ExceptionCodeMacArithmeticX86Type)

§

MacSoftware(ExceptionCodeMacSoftwareType)

§

MacBreakpointArm(ExceptionCodeMacBreakpointArmType)

§

MacBreakpointPpc(ExceptionCodeMacBreakpointPpcType)

§

MacBreakpointX86(ExceptionCodeMacBreakpointX86Type)

§

MacResource(ExceptionCodeMacResourceType, u64, u64)

§

MacGuard(ExceptionCodeMacGuardType, u64, u64)

§

LinuxGeneral(ExceptionCodeLinux, u32)

A Linux/Android error code with no other interesting metadata.

§

LinuxSigill(ExceptionCodeLinuxSigillKind)

§

LinuxSigtrap(ExceptionCodeLinuxSigtrapKind)

§

LinuxSigbus(ExceptionCodeLinuxSigbusKind)

§

LinuxSigfpe(ExceptionCodeLinuxSigfpeKind)

§

LinuxSigsegv(ExceptionCodeLinuxSigsegvKind)

§

LinuxSigsys(ExceptionCodeLinuxSigsysKind)

§

WindowsGeneral(ExceptionCodeWindows)

A Windows error code with no other interesting metadata.

§

WindowsWinError(WinErrorWindows)

A Windows error from winerror.h.

§

WindowsWinErrorWithFacility(WinErrorFacilityWindows, WinErrorWindows)

A Windows error for a specific facility from winerror.h.

§

WindowsNtStatus(NtStatusWindows)

A Windows error from ntstatus.h

§

WindowsAccessViolation(ExceptionCodeWindowsAccessType)

ExceptionCodeWindows::EXCEPTION_ACCESS_VIOLATION but with details on the kind of access.

§

WindowsInPageError(ExceptionCodeWindowsInPageErrorType, u64)

ExceptionCodeWindows::EXCEPTION_IN_PAGE_ERROR but with details on the kind of access. Second argument is a windows NTSTATUS value.

§

WindowsStackBufferOverrun(u64)

ExceptionCodeWindows::EXCEPTION_STACK_BUFFER_OVERRUN with an accompanying windows FAST_FAIL value.

§

WindowsUnknown(u32)

A Windows error with no known mapping.

§

Unknown(u32, u32)

Implementations§

source§

impl CrashReason

source

pub fn from_windows_code(exception_code: u32) -> CrashReason

Heuristically identifies what kind of windows exception code this is.

Augments CrashReason::from_windows_error by also including ExceptionCodeWindows. Appropriate for an actual crash reason.

source

pub fn from_windows_error(error_code: u32) -> CrashReason

Heuristically identifies what kind of windows error code this is.

Appropriate for things like LastErrorValue() which may be non-fatal.

source

pub fn from_windows_error_with_facility(error_code: u32) -> Option<CrashReason>

source

pub fn from_windows_exception( raw: &MINIDUMP_EXCEPTION_STREAM, _cpu: Cpu ) -> Option<CrashReason>

source

pub fn from_mac_exception( raw: &MINIDUMP_EXCEPTION_STREAM, cpu: Cpu ) -> Option<CrashReason>

source

pub fn from_linux_exception( raw: &MINIDUMP_EXCEPTION_STREAM, _cpu: Cpu ) -> Option<CrashReason>

Trait Implementations§

source§

impl Clone for CrashReason

source§

fn clone(&self) -> CrashReason

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CrashReason

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for CrashReason

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

A string describing the crash reason.

This is OS- and possibly CPU-specific. For example, “EXCEPTION_ACCESS_VIOLATION” (Windows), “EXC_BAD_ACCESS / KERN_INVALID_ADDRESS” (Mac OS X), “SIGSEGV” (other Unix).

source§

impl PartialEq for CrashReason

source§

fn eq(&self, other: &CrashReason) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for CrashReason

source§

impl Eq for CrashReason

source§

impl StructuralPartialEq for CrashReason

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more