pub enum WorkerError {
Show 27 variants
CryptoError(CryptoError),
ArithmeticError(ArithmeticError),
ViewError(ViewError),
ReadCertificatesError(Vec<CryptoHash>),
ChainError(Box<ChainError>),
BcsError(Error),
InvalidOwner,
InvalidSigner(AccountOwner),
UnexpectedBlockHeight {
expected_block_height: BlockHeight,
found_block_height: BlockHeight,
},
InvalidEpoch {
chain_id: ChainId,
chain_epoch: Epoch,
epoch: Epoch,
},
EventsNotFound(Vec<EventId>),
InvalidCrossChainRequest,
InvalidBlockChaining,
InvalidTimestamp {
block_timestamp: Timestamp,
local_time: Timestamp,
block_time_grace_period: Duration,
},
MissingCertificateValue,
LocalBlockNotFound {
height: BlockHeight,
chain_id: ChainId,
},
InvalidLiteCertificate,
FastBlockUsingOracles,
BlobsNotFound(Vec<BlobId>),
ConfirmedBlockHashNotFound {
height: BlockHeight,
chain_id: ChainId,
},
InvalidBlockProposal(String),
UnexpectedBlob,
TooManyPublishedBlobs(u64),
MissingNetworkDescription,
Thread(Error),
NoFallbackMode,
PoisonedWorker,
}Expand description
Error type for worker operations.
Variants§
CryptoError(CryptoError)
ArithmeticError(ArithmeticError)
ViewError(ViewError)
ReadCertificatesError(Vec<CryptoHash>)
ChainError(Box<ChainError>)
BcsError(Error)
InvalidOwner
InvalidSigner(AccountOwner)
UnexpectedBlockHeight
InvalidEpoch
EventsNotFound(Vec<EventId>)
InvalidCrossChainRequest
InvalidBlockChaining
InvalidTimestamp
MissingCertificateValue
LocalBlockNotFound
InvalidLiteCertificate
FastBlockUsingOracles
BlobsNotFound(Vec<BlobId>)
ConfirmedBlockHashNotFound
InvalidBlockProposal(String)
UnexpectedBlob
TooManyPublishedBlobs(u64)
MissingNetworkDescription
Thread(Error)
NoFallbackMode
PoisonedWorker
Implementations§
Source§impl WorkerError
impl WorkerError
Sourcepub fn is_local(&self) -> bool
pub fn is_local(&self) -> bool
Returns whether this error is caused by an issue in the local node.
Returns false whenever the error could be caused by a bad message from a peer.
Sourcepub fn error_type(&self) -> String
pub fn error_type(&self) -> String
Returns the qualified error variant name for the error_type metric label,
e.g. "WorkerError::UnexpectedBlockHeight".
For ChainError variants, delegates to ChainError::error_type() to
surface the underlying error name rather than just "ChainError".
Trait Implementations§
Source§impl Debug for WorkerError
impl Debug for WorkerError
Source§impl Display for WorkerError
impl Display for WorkerError
Source§impl Error for WorkerError
impl Error for WorkerError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl<'_derivative_strum> From<&'_derivative_strum WorkerError> for &'static str
impl<'_derivative_strum> From<&'_derivative_strum WorkerError> for &'static str
Source§fn from(x: &'_derivative_strum WorkerError) -> &'static str
fn from(x: &'_derivative_strum WorkerError) -> &'static str
Converts to this type from the input type.
Source§impl From<ArithmeticError> for WorkerError
impl From<ArithmeticError> for WorkerError
Source§fn from(source: ArithmeticError) -> Self
fn from(source: ArithmeticError) -> Self
Converts to this type from the input type.
Source§impl From<Box<ChainError>> for WorkerError
impl From<Box<ChainError>> for WorkerError
Source§fn from(source: Box<ChainError>) -> Self
fn from(source: Box<ChainError>) -> Self
Converts to this type from the input type.
Source§impl From<ChainError> for WorkerError
impl From<ChainError> for WorkerError
Source§fn from(chain_error: ChainError) -> Self
fn from(chain_error: ChainError) -> Self
Converts to this type from the input type.
Source§impl From<CryptoError> for WorkerError
impl From<CryptoError> for WorkerError
Source§fn from(source: CryptoError) -> Self
fn from(source: CryptoError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for WorkerError
impl From<Error> for WorkerError
Source§impl From<Error> for WorkerError
impl From<Error> for WorkerError
Source§impl From<ViewError> for WorkerError
impl From<ViewError> for WorkerError
Source§impl From<WorkerError> for &'static str
impl From<WorkerError> for &'static str
Source§fn from(x: WorkerError) -> &'static str
fn from(x: WorkerError) -> &'static str
Converts to this type from the input type.
Source§impl From<WorkerError> for LocalNodeError
impl From<WorkerError> for LocalNodeError
Source§fn from(error: WorkerError) -> Self
fn from(error: WorkerError) -> Self
Converts to this type from the input type.
Source§impl From<WorkerError> for NodeError
impl From<WorkerError> for NodeError
Source§fn from(error: WorkerError) -> Self
fn from(error: WorkerError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for WorkerError
impl !RefUnwindSafe for WorkerError
impl Send for WorkerError
impl Sync for WorkerError
impl Unpin for WorkerError
impl UnsafeUnpin for WorkerError
impl !UnwindSafe for WorkerError
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<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
Converts
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>
Converts
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestSource§impl<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
impl<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
Source§fn read<'instance>(
&self,
instance: &'instance &mut I,
location: GuestPointer,
length: u32,
) -> Result<Cow<'instance, [u8]>, RuntimeError>
fn read<'instance>( &self, instance: &'instance &mut I, location: GuestPointer, length: u32, ) -> Result<Cow<'instance, [u8]>, RuntimeError>
Reads length bytes from memory from the provided location.
Source§fn write(
&mut self,
instance: &mut &mut I,
location: GuestPointer,
bytes: &[u8],
) -> Result<(), RuntimeError>
fn write( &mut self, instance: &mut &mut I, location: GuestPointer, bytes: &[u8], ) -> Result<(), RuntimeError>
Writes the bytes to memory at the provided location.