MCPcopy Index your code
hub / github.com/explodingcamera/tinywasm / Trap

Enum Trap

crates/tinywasm/src/error.rs:110–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108#[non_exhaustive]
109#[cfg_attr(feature = "debug", derive(Debug))]
110pub enum Trap {
111 /// An unreachable instruction was executed
112 Unreachable,
113
114 /// A host function returned an error
115 HostFunction(Box<dyn core::error::Error + Send + Sync>),
116
117 /// An out-of-bounds memory access occurred
118 MemoryOutOfBounds {
119 /// The offset of the access
120 offset: usize,
121 /// The size of the access
122 len: usize,
123 /// The maximum size of the memory
124 max: usize,
125 },
126
127 /// An out-of-bounds table access occurred
128 TableOutOfBounds {
129 /// The offset of the access
130 offset: usize,
131 /// The size of the access
132 len: usize,
133 /// The maximum size of the memory
134 max: usize,
135 },
136
137 /// A division by zero occurred
138 DivisionByZero,
139
140 /// Invalid Integer Conversion
141 InvalidConversionToInt,
142
143 /// The store is not the one that the module instance was instantiated in
144 InvalidStore,
145
146 /// Integer Overflow
147 IntegerOverflow,
148
149 /// Call stack overflow
150 CallStackOverflow,
151
152 /// Value stack overflow
153 ValueStackOverflow,
154
155 /// The runtime could not allocate memory for a stack or linear memory operation.
156 OutOfMemory,
157
158 /// An undefined element was encountered
159 UndefinedElement {
160 /// The element index
161 index: usize,
162 },
163
164 /// An uninitialized element was encountered
165 UninitializedElement {
166 /// The element index
167 index: usize,

Callers 5

read_exactMethod · 0.85
read_vecMethod · 0.85
fillMethod · 0.85
copy_from_sliceMethod · 0.85
fromMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected