1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//! Error types surfaced by the public API.
use Error;
/// `Result<T, Error>` shorthand for any systemless operation.
pub type Result<T> = Result;
/// Top-level error returned by [`crate::runner::FixtureRunner`] and
/// the supporting traps. Variants:
///
/// * [`Error::UnimplementedTrap`] — the dispatcher reached an A-line
/// trap word with no matching handler. The trap word is included
/// for diagnosis. Adding a `(is_tool, trap_num) =>` arm in the
/// appropriate `src/trap/*.rs` file is how you fix this.
///
/// * [`Error::Halted`] — the guest application called `ExitToShell`
/// (or otherwise reached a halt state). Not a failure per se;
/// callers that loop on `run_steps` use `still_running == false`
/// from the tuple instead of catching this.
///
/// * [`Error::Timeout`] — execution exceeded a caller-supplied
/// instruction budget without halting. The carried `usize` is the
/// instruction-count cap that was hit.
///
/// * [`Error::Oracle`] — recording-side error from the cross-runtime
/// parity oracle (filesystem write, JSON serialisation, etc).
/// Surfaces only when oracle recording is enabled via
/// `enable_oracle_recording`.