Expand description
PluginError covers every failure mode described in
docs/specs/plugin-api.md §Edge cases.
Load-time errors (Compile, UnknownDataDep, MalformedDataDeps,
IdCollision) are collected in a Vec<PluginError> by the registry
and surfaced via linesmith doctor. Runtime errors (Runtime,
ResourceExceeded, Timeout, MalformedReturn) drop the plugin
segment for one render invocation and log once to stderr.
Enums§
- Collision
Winner - What “won” an
PluginError::IdCollision— either a built-in segment (which plugins can never shadow) or another plugin (keyed by path). Avoids the stringly-typedPathBuf::from("<built-in>")sentinel used before. - Plugin
Error - Every failure mode a plugin can hit at load time or render time.
Variants match
plugin-api.md§Edge cases; error copy is aimed at the person readinglinesmith doctoroutput, not the plugin author’s script. - Resource
Limit - Which of the configured rhai resource ceilings tripped. One-to-one
with the
MAX_*constants incrate::engine; a typed enum here (rather than&'static str) keepsPluginError::ResourceExceededandlinesmith doctoroutput typo-proof.