-
Notifications
You must be signed in to change notification settings - Fork 0
/
exceptions.py
35 lines (30 loc) · 872 Bytes
/
exceptions.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
class InvalidLabelException(Exception):
'''
Exception to raise when empty label is provided, e.g. ":", ":Label".
'''
pass
class InvalidTokenException(Exception):
'''
Exception to raise when unsupported token found in assembly code.
'''
pass
class InvalidArgumentException(Exception):
'''
Exception to raise when incorrect number of arguments given.
'''
pass
class InvalidRegisterException(Exception):
'''
Exception to raise when incorrect register is provided as argument.
'''
pass
class InvalidAddressException(Exception):
'''
Exception to raise when memory address provided as hexadecimal is not valid.
'''
pass
class ImplementationErrorException(Exception):
'''
Exception to raise if assembler enters state that should not be possible.
'''
pass