[Priv Exceptions] added __str__ as __repr__ alias to CpuTrap to correctly format exceptions when printed

This commit is contained in:
Anton Lydike 2021-06-05 15:25:39 +02:00
parent 3e4920f5d9
commit c770cc05cf

View File

@ -62,6 +62,9 @@ class CpuTrap(BaseException):
name, self.priv.name, self.type.name, self.mtval
)
def __str__(self):
return self.__repr__()
class IllegalInstructionTrap(CpuTrap):
def __init__(self, ins: 'ElfInstruction'):