Skip to content
Snippets Groups Projects
Commit 1885b618 authored by Ramin Yaghoubzadeh Torky's avatar Ramin Yaghoubzadeh Torky
Browse files

Corrected/added exceptions

parent 2fec3228
No related branches found
No related tags found
No related merge requests found
...@@ -157,10 +157,15 @@ class IUNotFoundError(Exception): ...@@ -157,10 +157,15 @@ class IUNotFoundError(Exception):
def __init__(self, iu_uid): def __init__(self, iu_uid):
super(IUNotFoundError, self).__init__('Lookup of IU ' + str(iu_uid) + ' failed.') super(IUNotFoundError, self).__init__('Lookup of IU ' + str(iu_uid) + ' failed.')
class IUPayloadLockTimeoutError(Exception) class IUPayloadLockTimeoutError(Exception):
"""Error indicating that exclusive access to the Payload could not be obtained in time.""" """Error indicating that exclusive access to the Payload could not be obtained in time."""
def __init__(self, iu): def __init__(self, iu):
super(IUPayloadLockTimeoutError, self).__init__('Timeout while accessing payload of IU' + str(iu.uid) + '.') super(IUPayloadLockTimeoutError, self).__init__('Timeout while accessing payload of IU ' + str(iu.uid) + '.')
class IUPayloadLockedError(Exception):
"""Error indicating that exclusive access to the Payload could not be obtained because someone actually locked it."""
def __init__(self, iu):
super(IUPayloadLockedError, self).__init__('IU '+str(iu.uid)+' was locked during access attempt.')
## --- Generation Architecture ----------------------------------------------- ## --- Generation Architecture -----------------------------------------------
......
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