Enum anchor_lang::error::Error
source · pub enum Error {
AnchorError(AnchorError),
ProgramError(ProgramErrorWithOrigin),
}
Variants§
AnchorError(AnchorError)
ProgramError(ProgramErrorWithOrigin)
Implementations§
source§impl Error
impl Error
pub fn log(&self)
pub fn with_account_name(self, account_name: impl ToString) -> Self
pub fn with_source(self, source: Source) -> Self
pub fn with_pubkeys(self, pubkeys: (Pubkey, Pubkey)) -> Self
pub fn with_values(self, values: (impl ToString, impl ToString)) -> Self
Trait Implementations§
source§impl Error for Error
impl Error for Error
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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 From<AnchorError> for Error
impl From<AnchorError> for Error
source§fn from(ae: AnchorError) -> Self
fn from(ae: AnchorError) -> Self
Converts to this type from the input type.
source§impl From<Error> for Error
impl From<Error> for Error
source§fn from(error: BorshIoError) -> Self
fn from(error: BorshIoError) -> Self
Converts to this type from the input type.
source§impl From<Error> for ProgramError
impl From<Error> for ProgramError
source§fn from(e: Error) -> ProgramError
fn from(e: Error) -> ProgramError
Converts to this type from the input type.
source§impl From<ProgramError> for Error
impl From<ProgramError> for Error
source§fn from(program_error: ProgramError) -> Self
fn from(program_error: ProgramError) -> Self
Converts to this type from the input type.
source§impl From<ProgramErrorWithOrigin> for Error
impl From<ProgramErrorWithOrigin> for Error
source§fn from(pe: ProgramErrorWithOrigin) -> Self
fn from(pe: ProgramErrorWithOrigin) -> Self
Converts to this type from the input type.