pub enum InternalErrorKind {
CapacityOverflow,
DataCorrupted,
Database,
BlockAssembler,
VM,
MMR,
System,
Config,
Other,
}
Expand description
A list specifying categories of ckb internal error.
This list is intended to grow over time and it is not recommended to exhaustively match against it.
It is used with the InternalError
.
Variants§
CapacityOverflow
An arithmetic overflow occurs during capacity calculation, e.g. Capacity::safe_add
DataCorrupted
Persistent data had corrupted
Database
Error occurs during database operations
BlockAssembler
It indicates that the underlying error is BlockAssemblerError
VM
VM internal error
MMR
MMR internal error
System
Unknown system error
Config
The feature is disabled or is conflicted with the configuration
Other
Other system error
Implementations§
Source§impl InternalErrorKind
impl InternalErrorKind
Sourcepub fn because<E>(self, reason: E) -> InternalError
pub fn because<E>(self, reason: E) -> InternalError
Creates InternalError
base on InternalErrorKind
with an error as the reason.
Sourcepub fn other<T>(self, reason: T) -> InternalErrorwhere
T: Display,
pub fn other<T>(self, reason: T) -> InternalErrorwhere
T: Display,
Creates InternalError
base on InternalErrorKind
with a simple string as the reason.
Trait Implementations§
Source§impl Clone for InternalErrorKind
impl Clone for InternalErrorKind
Source§fn clone(&self) -> InternalErrorKind
fn clone(&self) -> InternalErrorKind
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for InternalErrorKind
impl Debug for InternalErrorKind
Source§impl Display for InternalErrorKind
impl Display for InternalErrorKind
Source§impl From<InternalErrorKind> for InternalError
impl From<InternalErrorKind> for InternalError
Source§fn from(kind: InternalErrorKind) -> Self
fn from(kind: InternalErrorKind) -> Self
Converts to this type from the input type.
Source§impl PartialEq for InternalErrorKind
impl PartialEq for InternalErrorKind
impl Copy for InternalErrorKind
impl Eq for InternalErrorKind
impl StructuralPartialEq for InternalErrorKind
Auto Trait Implementations§
impl Freeze for InternalErrorKind
impl RefUnwindSafe for InternalErrorKind
impl Send for InternalErrorKind
impl Sync for InternalErrorKind
impl Unpin for InternalErrorKind
impl UnwindSafe for InternalErrorKind
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
Mutably borrows from an owned value. Read more
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)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)