aboutsummaryrefslogtreecommitdiff
path: root/exceptions.py
blob: 98395ac620f803a85f5940921ebb1237d849b752 (plain)
1
2
3
4
5
6
7
8
9
10
class NebPanic(BaseException):
    pass

class InterpretPanic(NebPanic):
    def __init__(self, sym, msg, arg=None):
        big_message = f"[{sym.line}] '{sym.name}': {msg}"
        if arg is not None:
            big_message += f" ({arg})"
        super().__init__(big_message)