bcrypt.ctf/bcrypter/exceptions.py

23 lines
794 B
Python
Raw Normal View History

'''
========================================================
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)
2025-06-21 21:29:00 +10:00
class CmdDeclarationError(Exception):
pass