This commit is contained in:
Andre Wagner
2026-04-30 09:47:02 -05:00
parent 50b55eaeef
commit 29d2b0bba1
6 changed files with 54 additions and 6 deletions

View File

@@ -4,6 +4,8 @@
#include <stdexcept>
#include <string>
#include "expr.hh"
namespace tyche {
class VMRuntimeError : public std::runtime_error
@@ -36,6 +38,12 @@ public:
explicit VMInvalidOpcode(uint8_t opcode) : VMRuntimeError("Invalid opcode " + std::to_string(opcode)) {}
};
class VMInvalidOperation : public VMRuntimeError
{
public:
explicit VMInvalidOperation(BinaryOperationType op, Type type1, Type type2) : VMRuntimeError("Invalid binary operation") {} // TODO - print types
};
}
#endif //TYCHE_VM_EXCEPTIONS_HH