Skip to main content

ExceptionCode

Enum ExceptionCode 

Source
#[repr(u32)]
pub enum ExceptionCode {
Show 23 variants AccessViolation = 3_221_225_477, ArrayBoundsExceeded = 3_221_225_612, Breakpoint = 2_147_483_651, DatatypeMisalignment = 2_147_483_650, FltDenormalOperand = 3_221_225_613, FltDivideByZero = 3_221_225_614, FltInexactResult = 3_221_225_615, FltInvalidOperation = 3_221_225_616, FltOverflow = 3_221_225_617, FltStackCheck = 3_221_225_618, FltUnderflow = 3_221_225_619, GuardPage = 2_147_483_649, IllegalInstruction = 3_221_225_501, InPageError = 3_221_225_478, IntegerDivideByZero = 3_221_225_620, IntegerOverflow = 3_221_225_621, InvalidDisposition = 3_221_225_510, InvalidHandle = 3_221_225_480, NoncontinuableException = 3_221_225_509, PrivilegedInstruction = 3_221_225_622, SingleStep = 2_147_483_652, StackOverflow = 3_221_225_725, UnwindConsolidate = 2_147_483_689,
}
Available on Windows only.
Expand description

Codes for unhandled windows exceptions from msdn.

Variants§

§

AccessViolation = 3_221_225_477

The thread attempts to read from or write to a virtual address for which it does not have access.

§

ArrayBoundsExceeded = 3_221_225_612

The thread attempts to access an array element that is out of bounds, and the underlying hardware supports bounds checking.

§

Breakpoint = 2_147_483_651

A breakpoint is encountered.

§

DatatypeMisalignment = 2_147_483_650

The thread attempts to read or write data that is misaligned on hardware that does not provide alignment. For example, 16-bit values must be aligned on 2-byte boundaries, 32-bit values on 4-byte boundaries, and so on.

§

FltDenormalOperand = 3_221_225_613

One of the operands in a floating point operation is denormal. A denormal value is one that is too small to represent as a standard floating point value.

§

FltDivideByZero = 3_221_225_614

The thread attempts to divide a floating point value by a floating point divisor of 0 (zero).

§

FltInexactResult = 3_221_225_615

The result of a floating point operation cannot be represented exactly as a decimal fraction.

§

FltInvalidOperation = 3_221_225_616

A floating point exception that is not included in this list.

§

FltOverflow = 3_221_225_617

The exponent of a floating point operation is greater than the magnitude allowed by the corresponding type.

§

FltStackCheck = 3_221_225_618

The stack has overflowed or underflowed, because of a floating point operation.

§

FltUnderflow = 3_221_225_619

The exponent of a floating point operation is less than the magnitude allowed by the corresponding type.

§

GuardPage = 2_147_483_649

The thread accessed memory allocated with the PAGE_GUARD modifier.

§

IllegalInstruction = 3_221_225_501

The thread tries to execute an invalid instruction.

§

InPageError = 3_221_225_478

The thread tries to access a page that is not present, and the system is unable to load the page. For example, this exception might occur if a network connection is lost while running a program over a network.

§

IntegerDivideByZero = 3_221_225_620

The thread attempts to divide an integer value by an integer divisor of 0 (zero).

§

IntegerOverflow = 3_221_225_621

The result of an integer operation creates a value that is too large to be held by the destination register. In some cases, this will result in a carry out of the most significant bit of the result. Some operations do not set the carry flag.

§

InvalidDisposition = 3_221_225_510

An exception handler returns an invalid disposition to the exception dispatcher. Programmers using a high-level language such as C should never encounter this exception.

§

InvalidHandle = 3_221_225_480

The thread used a handle to a kernel object that was invalid (probably because it had been closed.)

§

NoncontinuableException = 3_221_225_509

The thread attempts to continue execution after a non-continuable exception occurs.

§

PrivilegedInstruction = 3_221_225_622

The thread attempts to execute an instruction with an operation that is not allowed in the current computer mode.

§

SingleStep = 2_147_483_652

A trace trap or other single instruction mechanism signals that one instruction is executed.

§

StackOverflow = 3_221_225_725

The thread uses up its stack.

§

UnwindConsolidate = 2_147_483_689

A frame consolidation has been executed.

Implementations§

Source§

impl ExceptionCode

Source

pub fn try_from_code(code: u32) -> Result<Self, TryFromPrimitiveError<Self>>

Try to interpret the given code as a windows exception code.

Source

pub fn code(self) -> u32

Returns the underlying windows exception code.

Trait Implementations§

Source§

impl Clone for ExceptionCode

Source§

fn clone(&self) -> ExceptionCode

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for ExceptionCode

Source§

impl Debug for ExceptionCode

Source§

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

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

impl Display for ExceptionCode

Source§

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

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

impl Eq for ExceptionCode

Source§

impl From<ExceptionCode> for RawRpcError

Available on crate feature rpc-core only.
Source§

fn from(err: ExceptionCode) -> Self

Converts to this type from the input type.
Source§

impl From<ExceptionCode> for u32

Source§

fn from(enum_value: ExceptionCode) -> Self

Converts to this type from the input type.
Source§

impl From<ExceptionCode> for InjectError

Available on crate feature syringe only.
Source§

fn from(err: ExceptionCode) -> Self

Converts to this type from the input type.
Source§

impl From<ExceptionCode> for EjectError

Available on crate feature syringe only.
Source§

fn from(err: ExceptionCode) -> Self

Converts to this type from the input type.
Source§

impl From<ExceptionCode> for LoadProcedureError

Available on crate feature syringe only.
Source§

fn from(err: ExceptionCode) -> Self

Converts to this type from the input type.
Source§

impl From<ExceptionCode> for SyringeError

Available on crate feature syringe only.
Source§

fn from(err: ExceptionCode) -> Self

Converts to this type from the input type.
Source§

impl Hash for ExceptionCode

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for ExceptionCode

Source§

fn cmp(&self, other: &ExceptionCode) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for ExceptionCode

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for ExceptionCode

Source§

fn partial_cmp(&self, other: &ExceptionCode) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl StructuralPartialEq for ExceptionCode

Source§

impl TryFrom<u32> for ExceptionCode

Source§

type Error = TryFromPrimitiveError<ExceptionCode>

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

fn try_from(number: u32) -> Result<Self, TryFromPrimitiveError<Self>>

Performs the conversion.
Source§

impl TryFromPrimitive for ExceptionCode

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DropFlavorWrapper<T> for T

Source§

type Flavor = MayDrop

The DropFlavor that wraps T into Self
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, W> HasTypeWitness<W> for T
where W: MakeTypeWitness<Arg = T>, T: ?Sized,

Source§

const WITNESS: W = W::MAKE

A constant of the type witness
Source§

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

Source§

const TYPE_EQ: TypeEq<T, <T as Identity>::Type> = TypeEq::NEW

Proof that Self is the same type as Self::Type, provides methods for casting between Self and Self::Type.
Source§

type Type = T

The same type as Self, used to emulate type equality bounds (T == U) with associated type equality constraints (T: Identity<Type = U>).
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,

Source§

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§

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

Source§

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

Source§

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.