From 2b87bbe27031904d00bc99f6e377d574cbb23e87 Mon Sep 17 00:00:00 2001 From: Anton Lydike Date: Sun, 18 Apr 2021 12:12:00 +0200 Subject: [PATCH] reformat Exceptions.py --- riscemu/Exceptions.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 + )