mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-13 17:11:21 +00:00
Add illegal arithmetic runtime error
This commit is contained in:
@ -70,6 +70,7 @@ public:
|
||||
IncorrectCallIndirectSignature = 1,
|
||||
MemoryOutOfBounds = 2,
|
||||
CallIndirectOOB = 3,
|
||||
IllegalArithmetic = 4,
|
||||
Unknown,
|
||||
};
|
||||
|
||||
@ -98,6 +99,12 @@ private:
|
||||
case Type::MemoryOutOfBounds:
|
||||
out << "memory access out-of-bounds";
|
||||
break;
|
||||
case Type::CallIndirectOOB:
|
||||
out << "call_indirect out-of-bounds";
|
||||
break;
|
||||
case Type::IllegalArithmetic:
|
||||
out << "illegal arithmetic operation";
|
||||
break;
|
||||
case Type::Unknown:
|
||||
default:
|
||||
out << "unknown";
|
||||
@ -142,7 +149,6 @@ extern "C" {
|
||||
}
|
||||
|
||||
[[noreturn]] void throw_trap(WasmTrap::Type ty) {
|
||||
std::cout << "throwing trap: " << ty << std::endl;
|
||||
throw WasmTrap(ty);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user