Expand description
The runtime’s error type and its stable integer codes.
SSRuntimeError::as_code maps each variant to a small integer that is part of the
C ABI: across FFI a call reports failure by return value and the caller retrieves the
code with ss_runtime_get_last_error. These numbers are a compatibility surface —
existing variants keep their codes, and new ones take fresh numbers rather than
reusing a retired one.
SSRuntimeError::as_str is the other half, reached across FFI as
ss_runtime_error_message(code). A code tells a Player’s code what happened; the
text is what it shows its user, so it is written to be read by someone holding a
.sspj rather than a debugger. Keep a new variant’s wording in that register.
The text carries no payload. InvalidVersion knows two version numbers, but a
Player that wants them should read ss_runtime_ssab_schema_version and the pack’s own
version field — two integers it can act on, rather than a sentence it would have to
parse. core::fmt::Display does append them, for Rust callers and the wasm face.
Enums§
- SSRuntime
Error - Everything that can go wrong loading or playing back an animation.