#[non_exhaustive]pub enum DialogueError {
Parse {
file: String,
line: usize,
message: String,
},
UnknownNode(String),
DuplicateNode(String),
Validation(String),
ProtocolViolation(String),
TypeMismatch {
expected: String,
got: String,
context: String,
},
UndefinedVariable(String),
Function {
name: String,
message: String,
},
}Expand description
All errors that can be produced by compilation or runtime execution.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Parse
A parse-time error, optionally localised to a source span.
Fields
UnknownNode(String)
A reference to an unknown node.
DuplicateNode(String)
A duplicate node title was found across merged sources.
Validation(String)
A validation failure detected after all sources are merged.
ProtocolViolation(String)
The Runner API was called in the wrong
order (e.g. next_event while
awaiting an option, or
select_option when not
awaiting).
Embedders can match on this variant to detect integration bugs without parsing the error message string.
TypeMismatch
A type mismatch in an expression (e.g. adding a number to a string).
expected and got are human-readable descriptions of the involved
types; context is the operation that triggered the mismatch.
Fields
UndefinedVariable(String)
An unknown variable was referenced.
Function
A function call failed.
Trait Implementations§
Source§impl Clone for DialogueError
impl Clone for DialogueError
Source§fn clone(&self) -> DialogueError
fn clone(&self) -> DialogueError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DialogueError
impl Debug for DialogueError
Source§impl Display for DialogueError
impl Display for DialogueError
Source§impl Error for DialogueError
impl Error for DialogueError
1.30.0 · 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()