22 lines
469 B
Python
22 lines
469 B
Python
from .opcode_names 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']
|