Exceptions: added an UnmountingFailed exception
This commit is contained in:
1 parent
8f75b466b7
commit
65e6e22e2d
1 file changed
+10
@@ -27,6 +27,16 @@ class LoopCenteringFailed(Exception):
|
||||
return self.message
|
||||
|
||||
|
||||
class UnmountingFailed(Exception):
|
||||
def __init__(self, message: str = "A sample was not unmounted"):
|
||||
super().__init__(message)
|
||||
self.message = message
|
||||
logger.error(message, extra={"exception:": Exception})
|
||||
|
||||
def __str__(self) -> str:
|
||||
return self.message
|
||||
|
||||
|
||||
class MountingFailed(Exception):
|
||||
def __init__(self, message: str = "A sample was not mounted"):
|
||||
super().__init__(message)
|
||||
|
||||
Reference in new issue
Block a user