mirror of
https://github.com/datafolklabs/cement.git
synced 2026-02-06 13:56:49 +00:00
Fix generator class_name exception
This commit is contained in:
parent
183fd58a05
commit
43015d7d70
@ -12,3 +12,4 @@ documentation, or testing:
|
||||
- Subhash Bhushan (subhashb)
|
||||
- Sam Likins (samlikins)
|
||||
- Dakota Blair (dakotablair)
|
||||
- Luca Crea (lcrea)
|
||||
|
||||
@ -1,13 +1,4 @@
|
||||
|
||||
class {{ class_name }}Error(Exception):
|
||||
"""Generic errors."""
|
||||
|
||||
def __init__(self, msg):
|
||||
Exception.__init__(self)
|
||||
self.msg = msg
|
||||
|
||||
def __str__(self):
|
||||
return self.msg
|
||||
|
||||
def __repr__(self):
|
||||
return "<{{ class_name }}Error - %s>" % self.msg
|
||||
pass
|
||||
|
||||
@ -66,7 +66,7 @@ def main():
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
|
||||
except {{ class_name}}Error:
|
||||
except {{ class_name }}Error as e:
|
||||
print('{{ class_name }}Error > %s' % e.args[0])
|
||||
app.exit_code = 1
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user