Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import java.util.Deque;
import java.util.HashMap;
import java.util.Map;
import run.endive.wasm.InvalidException;
import run.endive.wasm.types.FunctionType;
import run.endive.wasm.types.Instruction;
import run.endive.wasm.types.OpCode;
Expand Down Expand Up @@ -91,10 +92,10 @@ public Deque<ValType> types() {

public void verifyEmpty() {
if (types.size() != 1) {
throw new RuntimeException("Bad types stack: " + types);
throw new InvalidException("Bad types stack: " + types);
}
if (!types().isEmpty()) {
throw new RuntimeException("Types not empty: " + types());
throw new InvalidException("Types not empty: " + types());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ protected void evalDefault(
Instruction instruction,
Operands operands)
throws WasmEngineException {
throw new RuntimeException("Machine doesn't recognize Instruction " + instruction);
throw new WasmEngineException("Machine doesn't recognize Instruction " + instruction);
}

@Override
Expand Down
Loading