pub enum RuntimeError {
Show 31 variants
Decode(DecodeError),
UnresolvedDefinition(DefinitionId),
NoRootContainer,
StackUnderflow,
CallStackUnderflow,
ContainerStackUnderflow,
InvalidChoiceIndex {
index: usize,
available: usize,
},
NotWaitingForChoice,
StoryEnded,
UnresolvedGlobal(DefinitionId),
TypeError(String),
DivisionByZero,
Unimplemented(String),
UnresolvedExternalCall(DefinitionId),
CaptureUnderflow,
UnknownFlow(String),
FlowAlreadyExists(String),
RanOutOfContent,
StepLimitExceeded(u64),
LineLimitExceeded(usize),
LocaleChecksumMismatch {
expected: u32,
actual: u32,
},
LocaleScopeNotInBase(DefinitionId),
LocaleScopeMissing(DefinitionId),
FunctionYielded,
NotEvaluatingFunction,
AlreadyEvaluatingFunction,
FunctionNotFound(String),
AsyncExternalInCall(String),
UnknownPath(String),
JumpWhileAwaitingExternal {
path: String,
external: String,
},
ArgCountMismatch {
target: String,
expected: u8,
got: usize,
},
}Expand description
Errors that can occur during story linking or execution.
Variants§
Decode(DecodeError)
UnresolvedDefinition(DefinitionId)
NoRootContainer
StackUnderflow
CallStackUnderflow
ContainerStackUnderflow
InvalidChoiceIndex
NotWaitingForChoice
StoryEnded
UnresolvedGlobal(DefinitionId)
TypeError(String)
DivisionByZero
Unimplemented(String)
UnresolvedExternalCall(DefinitionId)
CaptureUnderflow
UnknownFlow(String)
FlowAlreadyExists(String)
RanOutOfContent
StepLimitExceeded(u64)
LineLimitExceeded(usize)
LocaleChecksumMismatch
LocaleScopeNotInBase(DefinitionId)
LocaleScopeMissing(DefinitionId)
FunctionYielded
NotEvaluatingFunction
AlreadyEvaluatingFunction
FunctionNotFound(String)
call_function was given a name that resolves to no function/knot.
AsyncExternalInCall(String)
A function evaluated via the synchronous call_function path called an
external whose handler deferred (Pending) — it can’t be resolved in a
one-shot synchronous call.
UnknownPath(String)
choose_path_string was given a path that resolves to no knot,
stitch, or label.
JumpWhileAwaitingExternal
choose_path_string was called while the flow is parked on an
unresolved external call. A pending host call cannot be silently
abandoned — resolve it (or reset the story) before jumping.
ArgCountMismatch
A host-directed entry (choose_path_string_with_args) — or a
call_function — was given the wrong number of arguments for the
target’s declared parameters.
Trait Implementations§
Source§impl Debug for RuntimeError
impl Debug for RuntimeError
Source§impl Display for RuntimeError
impl Display for RuntimeError
Source§impl Error for RuntimeError
impl Error for RuntimeError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<DecodeError> for RuntimeError
impl From<DecodeError> for RuntimeError
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for RuntimeError
impl RefUnwindSafe for RuntimeError
impl Send for RuntimeError
impl Sync for RuntimeError
impl Unpin for RuntimeError
impl UnsafeUnpin for RuntimeError
impl UnwindSafe for RuntimeError
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