22 lines
794 B
Python
22 lines
794 B
Python
'''
|
|
========================================================
|
|
Exceptions for CLI / REPL Commands and Param/Opt Objects
|
|
========================================================
|
|
'''
|
|
class BadOptNameError(Exception):
|
|
__MSG = 'Opt.__init__() requires non-empty kwarg `name: str = ...`'
|
|
def __init__(self) -> None:
|
|
super().__init__(BadOptNameError.__MSG)
|
|
|
|
class InvalidOptError(Exception):
|
|
__MSG = 'Opt.__init__() requires at least 1 short/longform'
|
|
def __init__(self) -> None:
|
|
super().__init__(InvalidOptError.__MSG)
|
|
|
|
class DisjointOverlapError(Exception):
|
|
__MSG = 'Overlap.__add__() requires shared master, got disjoint'
|
|
def __init__(self) -> None:
|
|
super().__init__(DisjointOverlapError.__MSG)
|
|
|
|
class CmdDeclarationError(Exception):
|
|
pass
|