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