2020-11-09 21:59:28 -08:00
|
|
|
class MasqueError(Exception):
|
2016-03-15 19:12:39 -07:00
|
|
|
"""
|
2020-11-09 21:59:28 -08:00
|
|
|
Parent exception for all Masque-related Exceptions
|
2016-03-15 19:12:39 -07:00
|
|
|
"""
|
2020-11-09 21:59:28 -08:00
|
|
|
pass
|
2016-03-15 19:12:39 -07:00
|
|
|
|
2019-12-12 00:38:11 -08:00
|
|
|
|
2020-11-09 21:59:28 -08:00
|
|
|
class PatternError(MasqueError):
|
|
|
|
"""
|
|
|
|
Exception for Pattern objects and their contents
|
|
|
|
"""
|
|
|
|
pass
|
2019-12-12 00:38:11 -08:00
|
|
|
|
2020-09-26 17:37:23 -07:00
|
|
|
|
2020-11-09 21:59:28 -08:00
|
|
|
class LibraryError(MasqueError):
|
2020-09-26 17:37:23 -07:00
|
|
|
"""
|
|
|
|
Exception raised by Library classes
|
|
|
|
"""
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
2023-01-22 16:59:32 -08:00
|
|
|
class BuildError(MasqueError):
|
2020-11-09 22:09:47 -08:00
|
|
|
"""
|
2023-01-22 16:59:32 -08:00
|
|
|
Exception raised by builder-related functions
|
2020-11-09 22:09:47 -08:00
|
|
|
"""
|
|
|
|
pass
|
|
|
|
|
2023-01-22 16:59:32 -08:00
|
|
|
class PortError(MasqueError):
|
2020-11-09 22:09:47 -08:00
|
|
|
"""
|
|
|
|
Exception raised by builder-related functions
|
|
|
|
"""
|
|
|
|
pass
|
2023-04-07 16:33:23 -07:00
|
|
|
|
|
|
|
class OneShotError(MasqueError):
|
|
|
|
"""
|
|
|
|
Exception raised when a function decorated with `@oneshot` is called more than once
|
|
|
|
"""
|
|
|
|
def __init__(self, func_name: str) -> None:
|
|
|
|
Exception.__init__(self, f'Function "{func_name}" with @oneshot was called more than once')
|