MCPcopy Create free account
hub / github.com/RustOtomeLab/RustEng / ScriptError

Enum ScriptError

src/error.rs:34–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32
33#[derive(Debug, Error)]
34pub(crate) enum ScriptError {
35 #[error("invalid command at line {line}: {content}")]
36 InvalidCommand { line: usize, content: String },
37
38 #[error("malformed dialogue at line {line}: {content}")]
39 MalformedDialogue { line: usize, content: String },
40
41 #[error("unknown line at line {line}: {content}")]
42 UnknownLine { line: usize, content: String },
43
44 #[error("unsupported script version: need {need}, got `{indeed}`")]
45 UnsupportedVersion { need: usize, indeed: String },
46
47 #[error("invalid choice block: {0}")]
48 Choice(String),
49
50 #[error("command `{cmd}` at line {line} requires more arguments: {content}")]
51 ArgsTooShort {
52 cmd: String,
53 line: usize,
54 content: String,
55 },
56
57 #[error("failed to parse integer in script: {0}")]
58 ParseInt(#[from] std::num::ParseIntError),
59
60 #[error("failed to read script file `{path}`: {source}")]
61 ReadFile {
62 path: String,
63 #[source]
64 source: std::io::Error,
65 },
66}
67
68#[derive(Debug, Error)]
69pub(crate) enum ExecutorError {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected