pub enum StamError {
Show 25 variants
HandleError(&'static str),
IdNotFoundError(String, &'static str),
NoIdError(&'static str),
Unbound(&'static str),
AlreadyBound(&'static str),
AlreadyExists(usize, &'static str),
DuplicateIdError(String, &'static str),
BuildError(Box<StamError>, &'static str),
StoreError(Box<StamError>, &'static str),
IOError(Error, String, &'static str),
JsonError(Error<Error>, String, &'static str),
CsvError(String, &'static str),
RegexError(Error, &'static str),
SerializationError(String),
WrongSelectorType(&'static str),
WrongSelectorTarget(&'static str),
CursorOutOfBounds(Cursor, &'static str),
InvalidOffset(Cursor, Cursor, &'static str),
InvalidCursor(String, &'static str),
NoTarget(&'static str),
NoText(&'static str),
InUse(&'static str),
IncompleteError(String, &'static str),
ValueError(String, &'static str),
OtherError(&'static str),
}Expand description
This enum groups the different kind of errors that this STAM library can produce
Variants§
HandleError(&'static str)
This error is raised when the specified internal ID does not exist. The first parameter is the requested internal ID
IdNotFoundError(String, &'static str)
This error is raised when the specified public ID does not exist The first parameter is the requested public ID
NoIdError(&'static str)
This error is raised when an item has no public ID but one is expected
Unbound(&'static str)
This error is raised when an item has no internal ID but one is expected. This happens when an item is instantiated but not yet added to a store. We such an item unbound.
AlreadyBound(&'static str)
This error is raised when an item is already bound and you are trying it again
AlreadyExists(usize, &'static str)
This error is raised when an item is already exists and you are adding it again
DuplicateIdError(String, &'static str)
This error is raised when you attempt to set a public ID that is already in use (within a particular scope) The first parameter is the requested public ID
BuildError(Box<StamError>, &'static str)
This error indicates there was an error during the building of an item from its recipe. It wraps the deeper error that occured.
StoreError(Box<StamError>, &'static str)
This error indicates there was an error during the storage of an item It wraps the deeper error that occured.
IOError(Error, String, &'static str)
This error indicates there was an Input/Output error. It wraps the deeper error that occured.
JsonError(Error<Error>, String, &'static str)
This error indicates there was an error during JSON parsing. It wraps the deeper error that occurred.
CsvError(String, &'static str)
This error indicates there was an error during CSV parsing. It wraps the deeper error that occurred.
RegexError(Error, &'static str)
This error is raised when there is an error in regular expressions
SerializationError(String)
WrongSelectorType(&'static str)
This error is raised when you ask a selector to do something it is not capable of because it is the wrong type of selector
WrongSelectorTarget(&'static str)
This error is raised when you apply a selector on a target it is not intended for
CursorOutOfBounds(Cursor, &'static str)
This error indicates the cursor is out of bounds when applied to the text.
InvalidOffset(Cursor, Cursor, &'static str)
This error indicates the offset is invalid, the end precedes the beginning. It wraps the begin and end cursors, respectively
InvalidCursor(String, &'static str)
This error indicates the cursor is invalid
NoTarget(&'static str)
Annotation has no target
NoText(&'static str)
Annotation has no text
InUse(&'static str)
Called when removal of an item is requested but it is still being referenced.
IncompleteError(String, &'static str)
This error is raised when the information supplied during build is incomplete
ValueError(String, &'static str)
Unexpected value error
OtherError(&'static str)
Category for other errors, try to use this sparingly