更新异常
This commit is contained in:
parent
13047c2443
commit
bd1b011046
21
error.py
21
error.py
|
@ -1,15 +1,21 @@
|
||||||
class dtMemoryError(Exception):
|
class MemoryError(Exception):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class AddressError(dtMemoryError):
|
class AddressError(MemoryError):
|
||||||
|
def __init__(self, index=None):
|
||||||
|
super().__init__(self)
|
||||||
|
if not index:
|
||||||
|
self.errorinfo = "None"
|
||||||
|
else:
|
||||||
|
self.errorinfo = str(hex(index))
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return self.errorinfo
|
||||||
|
|
||||||
|
class OutOfMemory(MemoryError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class OutOfMemory(dtMemoryError):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class InstructionError(Exception):
|
class InstructionError(Exception):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -20,3 +26,4 @@ class InvalidInstruction(InstructionError):
|
||||||
|
|
||||||
class BadOperand(InstructionError):
|
class BadOperand(InstructionError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user