Enum bitcoin::blockdata::script::Error [] [src]

pub enum Error {
    AnalyzeNeitherBoolWorks,
    AnalyzeSetBoolMismatch(bool),
    AnalyzeValidateFailed,
    BadPublicKey,
    BadSignature,
    Ecdsa(Error),
    ElseWithoutIf,
    EndifWithoutIf,
    EqualVerifyFailed(StringString),
    IfEmptyStack,
    IllegalOpcode,
    InterpreterStackOverflow,
    EarlyEndOfScript,
    ExecutedReturn,
    MultisigBadKeyCount(isize),
    MultisigBadSigCount(isize),
    NegativePick,
    NegativeRoll,
    NoTransaction,
    NumEqualVerifyFailed(i64i64),
    NumericOverflow,
    PopEmptyStack,
    Unanalyzable,
    Unsatisfiable,
    VerifyEmptyStack,
    VerifyFailed,
}

Ways that a script might fail. Not everything is split up as much as it could be; patches welcome if more detailed errors would help you.

Variants

AnalyzeNeitherBoolWorks

Tried to set a boolean to both values, but neither worked

AnalyzeSetBoolMismatch(bool)

Tried to set a boolean to the given value, but it already had the other value

AnalyzeValidateFailed

Validation of an element failed

BadPublicKey

OP_CHECKSIG was called with a bad public key

BadSignature

OP_CHECKSIG was called with a bad signature

Ecdsa(Error)

An ECDSA error

ElseWithoutIf

An OP_ELSE happened while not in an OP_IF tree

EndifWithoutIf

An OP_ENDIF happened while not in an OP_IF tree

EqualVerifyFailed(StringString)

An OP_EQUALVERIFY failed (expected, gotten)

IfEmptyStack

An OP_IF happened with an empty stack

IllegalOpcode

An illegal opcode appeared in the script (does not need to be executed)

InterpreterStackOverflow

The interpreter overflowed its stack. This never happens for script evaluation, only non-consensus analysis passes.

EarlyEndOfScript

Some opcode expected a parameter, but it was missing or truncated

ExecutedReturn

An OP_RETURN or synonym was executed

MultisigBadKeyCount(isize)

A multisig tx with negative or too many keys

MultisigBadSigCount(isize)

A multisig tx with negative or too many signatures

NegativePick

Used OP_PICK with a negative index

NegativeRoll

Used OP_ROLL with a negative index

NoTransaction

Tried to execute a signature operation but no transaction context was provided

NumEqualVerifyFailed(i64i64)

An OP_NUMEQUALVERIFY failed (expected, gotten)

NumericOverflow

Tried to read an array off the stack as a number when it was more than 4 bytes

PopEmptyStack

Some stack operation was done with an empty stack

Unanalyzable

Analysis was unable to determine script input

Unsatisfiable

Analysis showed script cannot be satisfied

VerifyEmptyStack

An OP_VERIFY happened with an empty stack

VerifyFailed

An OP_VERIFY happened with zero on the stack

Trait Implementations

impl Clone for Error
[src]

fn clone(&self) -> Error

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

impl Debug for Error
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Eq for Error
[src]

impl PartialEq for Error
[src]

fn eq(&self, __arg_0: &Error) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &Error) -> bool

This method tests for !=.

impl Display for Error
[src]

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

Formats the value using the given formatter.

impl Error for Error
[src]

fn cause(&self) -> Option<&Error>

The lower-level cause of this error, if any. Read more

fn description(&self) -> &'static str

A short description of the error. Read more

impl Serialize for Error
[src]

fn serialize<S>(&self, serializer: &mut S) -> Result<(), S::Error> where S: Serializer

Serializes this value into this serializer.