#[non_exhaustive]pub enum Error {
Decode(DecodeError),
NoUserMemory(Model),
NoCommandLine(Model),
NotSetUp {
home: u32,
},
Unreadable(u32),
Memory(String),
Parse(String),
Invalid(String),
Context {
context: String,
source: Box<Error>,
},
}Expand description
What went wrong outside the decoder, or a DecodeError on the way.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Decode(DecodeError)
Nibbles that are not an object.
NoUserMemory(Model)
The model keeps no RPL user memory this crate reads (the aplet models, the Pioneers, the 28S, the 19BII).
NoCommandLine(Model)
The model has no RPL command line this crate reads, or (the 28S) none whose screens it follows.
NotSetUp
HOME (at this address) is no directory: the ROM has not set up its memory yet (not booted, or reset and not idle since).
Unreadable(u32)
The memory at this address cannot be read.
Memory(String)
Memory that is not as the ROM leaves it (implausible pointers, no stack end marker, a command line too long), as a message.
Parse(String)
Text that is no number of the kind asked for, or a number out of the calculator’s range, as a message.
Invalid(String)
An object or value the operation cannot take (one with no text form, a name too long to encode, a picture of the wrong size), as a message.
Context
source in the step described by context (stack level 2).
Implementations§
Source§impl Error
impl Error
Sourcepub fn root(&self) -> &Error
pub fn root(&self) -> &Error
The innermost error, under every Error::Context: match it for
the case (Error::NotSetUp, Error::Decode, …).
Sourcepub fn is_not_set_up(&self) -> bool
pub fn is_not_set_up(&self) -> bool
Whether the ROM has not set up its user memory yet.
Trait Implementations§
impl Eq for Error
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()