Skip to content
Snippets Groups Projects
Commit afa37f54 authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

add ImpossibleError

parent d1cfefc5
No related branches found
No related tags found
No related merge requests found
# v2.14.26
* added `dont_raise` to `Condition`
* added `ImpossibleError`
......@@ -91,6 +91,12 @@ it's magic
.. autoclass:: satella.exceptions.CodedCustomExceptionMetaclass
:members:
ImpossibleError
---------------
.. autoclass:: satella.exceptions.ImpossibleError
:members:
Satella-specific exceptions
===========================
......
__version__ = '2.14.26a2'
__version__ = '2.14.26a3'
......@@ -6,7 +6,7 @@ __all__ = ['BaseSatellaError', 'ResourceLockingError', 'ResourceNotLocked', 'Res
'ConfigurationValidationError', 'ConfigurationError', 'ConfigurationSchemaError',
'PreconditionError', 'MetricAlreadyExists', 'BaseSatellaException', 'CustomException',
'CodedCustomException', 'CodedCustomExceptionMetaclass', 'WouldWaitMore',
'ProcessFailed', 'AlreadyAllocated', 'Empty']
'ProcessFailed', 'AlreadyAllocated', 'Empty', 'ImpossibleError']
class CustomException(Exception):
......@@ -217,3 +217,12 @@ class ProcessFailed(BaseSatellaError, OSError):
def __str__(self):
return 'ProcessFailed(%s)' % (self.rc,)
class ImpossibleError(BaseSatellaError, RuntimeError):
"""
For these cases where your execution flow goes some place, that should be impossible
for it to reach.
Also inherits from `RuntimeError`
"""
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment