diff --git a/riscemu/Exceptions.py b/riscemu/Exceptions.py index 38da760..07348c8 100644 --- a/riscemu/Exceptions.py +++ b/riscemu/Exceptions.py @@ -1,6 +1,7 @@ from abc import abstractmethod from .colors import * + class RiscemuBaseException(BaseException): @abstractmethod def message(self): @@ -48,6 +49,7 @@ class LinkerException(RiscemuBaseException): def __init__(self, msg, data): self.msg = msg self.data = data + def message(self): return FMT_PARSE + "{}(\"{}\", data={})".format(self.__class__.__name__, self.msg, self.data) + FMT_NONE @@ -118,7 +120,6 @@ class InvalidSyscallException(RiscemuBaseException): ) + FMT_NONE - def INS_NOT_IMPLEMENTED(ins): raise UnimplementedInstruction(ins) @@ -132,4 +133,4 @@ class NumberFormatException(RiscemuBaseException): return "{}({})".format( self.__class__.__name__, self.msg - ) \ No newline at end of file + )