.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user