comparison resfinder/cge/output/exceptions.py @ 0:55051a9bc58d draft default tip

Uploaded
author dcouvin
date Mon, 10 Jan 2022 20:06:07 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:55051a9bc58d
1 #!/usr/bin/env python3
2
3
4 class DuplicateKeyError(Exception):
5 """ Raise when adding the same key to a dict twice."""
6 def __init__(self, message, *args):
7 self.message = message
8 # allow users initialize misc. arguments as any other builtin Error
9 super(DuplicateKeyError, self).__init__(message, *args)
10
11
12 class LockedObjectError(Exception):
13 """ Raise when attempting to alter a locked object."""
14 def __init__(self, message, *args):
15 self.message = message
16 # allow users initialize misc. arguments as any other builtin Error
17 super(LockedObjectError, self).__init__(message, *args)