pub struct ErrorThrower<ET: EngineTypes>(/* private fields */);Expand description
Default ErrorHandler that just throws a TeXError.
Trait Implementations§
Source§impl<ET: EngineTypes> ErrorHandler<ET> for ErrorThrower<ET>
impl<ET: EngineTypes> ErrorHandler<ET> for ErrorThrower<ET>
fn new() -> Self
Source§fn invalid_character(
&self,
_out: &ET::Outputs,
_memory: &MemoryManager<ET::Token>,
_state: &ET::State,
_c: ET::Char,
) -> Result<Option<StringLineSource<ET::Char>>, ()>
fn invalid_character( &self, _out: &ET::Outputs, _memory: &MemoryManager<ET::Token>, _state: &ET::State, _c: ET::Char, ) -> Result<Option<StringLineSource<ET::Char>>, ()>
“Text line contains an invalid character”. Read more
Source§fn wrong_definition(
&self,
_out: &ET::Outputs,
_memory: &MemoryManager<ET::Token>,
_state: &ET::State,
_found: &ET::Token,
_expected: &ET::Token,
_in_macro: &ET::Token,
) -> Result<Option<StringLineSource<ET::Char>>, ()>
fn wrong_definition( &self, _out: &ET::Outputs, _memory: &MemoryManager<ET::Token>, _state: &ET::State, _found: &ET::Token, _expected: &ET::Token, _in_macro: &ET::Token, ) -> Result<Option<StringLineSource<ET::Char>>, ()>
“Use of
\foo doesn’t match its definition”. Read moreSource§fn file_end_while_use(
&self,
_out: &ET::Outputs,
_memory: &MemoryManager<ET::Token>,
_state: &ET::State,
_in_macro: &ET::Token,
) -> Result<Option<StringLineSource<ET::Char>>, ()>
fn file_end_while_use( &self, _out: &ET::Outputs, _memory: &MemoryManager<ET::Token>, _state: &ET::State, _in_macro: &ET::Token, ) -> Result<Option<StringLineSource<ET::Char>>, ()>
“File ended while scanning use of
\foo”. Read moreSource§fn too_many_closebraces(
&self,
_out: &ET::Outputs,
_memory: &MemoryManager<ET::Token>,
_state: &ET::State,
) -> Result<Option<StringLineSource<ET::Char>>, ()>
fn too_many_closebraces( &self, _out: &ET::Outputs, _memory: &MemoryManager<ET::Token>, _state: &ET::State, ) -> Result<Option<StringLineSource<ET::Char>>, ()>
“Too many }’s”. Read more
Source§fn missing_begingroup(
&self,
_out: &ET::Outputs,
_memory: &MemoryManager<ET::Token>,
_state: &ET::State,
) -> Result<Option<StringLineSource<ET::Char>>, ()>
fn missing_begingroup( &self, _out: &ET::Outputs, _memory: &MemoryManager<ET::Token>, _state: &ET::State, ) -> Result<Option<StringLineSource<ET::Char>>, ()>
“Missing { inserted”. Read more
Source§fn missing_dollar(
&self,
_out: &ET::Outputs,
_memory: &MemoryManager<ET::Token>,
_state: &ET::State,
) -> Result<Option<StringLineSource<ET::Char>>, ()>
fn missing_dollar( &self, _out: &ET::Outputs, _memory: &MemoryManager<ET::Token>, _state: &ET::State, ) -> Result<Option<StringLineSource<ET::Char>>, ()>
“Missing $ inserted”. Read more
Source§fn missing_endgroup(
&self,
_out: &ET::Outputs,
_memory: &MemoryManager<ET::Token>,
_state: &ET::State,
) -> Result<Option<StringLineSource<ET::Char>>, ()>
fn missing_endgroup( &self, _out: &ET::Outputs, _memory: &MemoryManager<ET::Token>, _state: &ET::State, ) -> Result<Option<StringLineSource<ET::Char>>, ()>
“Missing } inserted”. Read more
Source§fn incomplete_conditional(
&self,
_out: &ET::Outputs,
_memory: &MemoryManager<ET::Token>,
_state: &ET::State,
_name: PrimitiveIdentifier,
_line_no: usize,
) -> Result<Option<StringLineSource<ET::Char>>, ()>
fn incomplete_conditional( &self, _out: &ET::Outputs, _memory: &MemoryManager<ET::Token>, _state: &ET::State, _name: PrimitiveIdentifier, _line_no: usize, ) -> Result<Option<StringLineSource<ET::Char>>, ()>
“Incomplete \if…; all text was ignored after line
n”. Read moreSource§fn undefined(
&self,
_out: &ET::Outputs,
_memory: &MemoryManager<ET::Token>,
_state: &ET::State,
_token: &ET::Token,
) -> Result<Option<StringLineSource<ET::Char>>, ()>
fn undefined( &self, _out: &ET::Outputs, _memory: &MemoryManager<ET::Token>, _state: &ET::State, _token: &ET::Token, ) -> Result<Option<StringLineSource<ET::Char>>, ()>
Source§fn paragraph_ended(
&self,
_out: &ET::Outputs,
_memory: &MemoryManager<ET::Token>,
_state: &ET::State,
_token: &ET::Token,
) -> Result<Option<StringLineSource<ET::Char>>, ()>
fn paragraph_ended( &self, _out: &ET::Outputs, _memory: &MemoryManager<ET::Token>, _state: &ET::State, _token: &ET::Token, ) -> Result<Option<StringLineSource<ET::Char>>, ()>
“Runaway argument? Paragraph ended before
\foo was complete.” Read moreSource§fn not_allowed_in_mode(
&self,
_out: &ET::Outputs,
_memory: &MemoryManager<ET::Token>,
_state: &ET::State,
_name: PrimitiveIdentifier,
_mode: TeXMode,
) -> Result<Option<StringLineSource<ET::Char>>, ()>
fn not_allowed_in_mode( &self, _out: &ET::Outputs, _memory: &MemoryManager<ET::Token>, _state: &ET::State, _name: PrimitiveIdentifier, _mode: TeXMode, ) -> Result<Option<StringLineSource<ET::Char>>, ()>
Source§fn missing_keyword(
&self,
_out: &ET::Outputs,
_memory: &MemoryManager<ET::Token>,
_state: &ET::State,
_kws: &'static [&'static str],
) -> Result<Option<StringLineSource<ET::Char>>, ()>
fn missing_keyword( &self, _out: &ET::Outputs, _memory: &MemoryManager<ET::Token>, _state: &ET::State, _kws: &'static [&'static str], ) -> Result<Option<StringLineSource<ET::Char>>, ()>
“Missing
x inserted” Read moreSource§fn missing_number(
&self,
_out: &ET::Outputs,
_memory: &MemoryManager<ET::Token>,
_state: &ET::State,
) -> Result<Option<StringLineSource<ET::Char>>, ()>
fn missing_number( &self, _out: &ET::Outputs, _memory: &MemoryManager<ET::Token>, _state: &ET::State, ) -> Result<Option<StringLineSource<ET::Char>>, ()>
“Missing number, treated as zero.” Read more
Auto Trait Implementations§
impl<ET> Freeze for ErrorThrower<ET>
impl<ET> RefUnwindSafe for ErrorThrower<ET>where
ET: RefUnwindSafe,
impl<ET> Send for ErrorThrower<ET>where
ET: Send,
impl<ET> Sync for ErrorThrower<ET>where
ET: Sync,
impl<ET> Unpin for ErrorThrower<ET>where
ET: Unpin,
impl<ET> UnsafeUnpin for ErrorThrower<ET>
impl<ET> UnwindSafe for ErrorThrower<ET>where
ET: UnwindSafe,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more