Struct ExceptionCode

Source
pub struct ExceptionCode(/* private fields */);
Expand description

§Exception Code 异常码

  • common exception or supper exception should use 101
  • you may need to define exception code

Implementations§

Source§

impl ExceptionCode

Source

pub const COMMON: u32 = 101u32

Source

pub const SUPER: u32 = 102u32

Source

pub const NULL_POINTER: u32 = 1_000u32

Source

pub const ARRAY_INDEX_OUT_OF: u32 = 1_100u32

Source

pub const ILLEGAL_ARGUMENT: u32 = 1_200u32

Source

pub const ILLEGAL_STATE: u32 = 1_300u32

Source

pub const IO: u32 = 1_400u32

Source

pub const FILE_NOT_FOUND: u32 = 1_500u32

Source

pub const SQL: u32 = 1_600u32

Source

pub const INTERRUPTED: u32 = 1_700u32

Source

pub const CLASS_CAST: u32 = 1_800u32

Source

pub const UNSUPPORTED_OPERATION: u32 = 1_900u32

Source

pub fn define(&mut self, code: u32) -> 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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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