Skip to content

Commit

Permalink
Call parent constructor
Browse files Browse the repository at this point in the history
This way we always record all information about the exception,
regardless of what it is.

Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>
  • Loading branch information
rtobar committed Oct 10, 2017
1 parent 5bcefc7 commit 8c26515
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dfms/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class InvalidDropException(DaliugeException):
An exception thrown when a Drop is created with a set of invalid arguments.
"""
def __init__(self, drop, reason):
DaliugeException.__init__(self, drop, reason)
if isinstance(drop, (list, tuple)):
self.oid, self.uid = drop
else:
Expand All @@ -51,6 +52,7 @@ class InvalidRelationshipException(DaliugeException):
instructed but is invalid in nature.
"""
def __init__(self, rel, reason):
DaliugeException.__init__(self, rel, reason)
self.rel = rel
self.reason = reason
self.msg = "InvalidRelationshipException <%r>: %s" % (self.rel, self.reason)
Expand All @@ -70,6 +72,7 @@ class NoDropException(DaliugeException):
"""

def __init__(self, drop_uid, reason=None):
DaliugeException.__init__(self, drop_uid, reason)
self._drop_uid = drop_uid
self._reason = reason

Expand All @@ -85,6 +88,7 @@ class NoSessionException(DaliugeException):
"""

def __init__(self, session_id, reason=None):
DaliugeException.__init__(self, session_id, reason)
self._session_id = session_id
self._reason = reason

Expand All @@ -101,6 +105,7 @@ class SessionAlreadyExistsException(DaliugeException):
"""

def __init__(self, session_id, reason=None):
DaliugeException.__init__(self, session_id, reason)
self._session_id = session_id
self._reason = reason

Expand Down

0 comments on commit 8c26515

Please sign in to comment.