mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-17 11:25:55 +08:00
Removes unused custom Exception handler.
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
from textwrap import dedent
|
||||
|
||||
class CustomException(Exception):
|
||||
argmap = {0: 'classname'}
|
||||
|
||||
def __init__(self, *args):
|
||||
self.args = args
|
||||
|
||||
def format(self):
|
||||
assert len(self.args) == len(self.argmap), \
|
||||
"""Wrong number of arguments passed to custom exception %s.""" \
|
||||
% self.__class__
|
||||
return self.message.format(**dict(zip(self.argmap, self.args)))
|
||||
|
||||
def __str__(self):
|
||||
return dedent(self.format()).strip('\n')
|
||||
Reference in New Issue
Block a user