proc: rearrange exception classes
This commit is contained in:
@@ -103,6 +103,11 @@ class LinkedExited(Exception):
|
||||
msg = self.msg % self.name
|
||||
Exception.__init__(self, msg)
|
||||
|
||||
class LinkedCompleted(LinkedExited):
|
||||
"""Raised when a linked proc finishes the execution cleanly"""
|
||||
|
||||
msg = "%r completed successfully"
|
||||
|
||||
class LinkedFailed(LinkedExited):
|
||||
"""Raised when a linked proc dies because of unhandled exception"""
|
||||
msg = "%r failed with %s"
|
||||
@@ -111,11 +116,6 @@ class LinkedFailed(LinkedExited):
|
||||
msg = self.msg % (name, typ.__name__)
|
||||
LinkedExited.__init__(self, name, msg)
|
||||
|
||||
class LinkedCompleted(LinkedExited):
|
||||
"""Raised when a linked proc finishes the execution cleanly"""
|
||||
|
||||
msg = "%r completed successfully"
|
||||
|
||||
class LinkedKilled(LinkedFailed):
|
||||
"""Raised when a linked proc dies because of unhandled GreenletExit
|
||||
(i.e. it was killed)
|
||||
|
Reference in New Issue
Block a user