Files
PJVM/pjvm/exceptions.py
2020-01-30 22:31:36 +01:00

22 lines
464 B
Python

from .opcodes import INSTRUCTIONS
class PJVMException(ValueError):
pass
class PJVMUnknownOpcode(PJVMException):
def __init__(self, opcode: int):
super(PJVMUnknownOpcode, self).__init__(f"OPCODE {opcode} -> {INSTRUCTIONS[opcode]['name']} not implemented")
class PJVMNotImplemented(PJVMException):
pass
class PJVMTypeError(PJVMException):
pass
__all__ = ['PJVMException', 'PJVMUnknownOpcode', 'PJVMNotImplemented', 'PJVMTypeError']