Fix generator class_name exception

This commit is contained in:
Luca Crea 2018-09-11 11:19:45 +02:00
parent 183fd58a05
commit 43015d7d70
3 changed files with 3 additions and 11 deletions

View File

@ -12,3 +12,4 @@ documentation, or testing:
- Subhash Bhushan (subhashb)
- Sam Likins (samlikins)
- Dakota Blair (dakotablair)
- Luca Crea (lcrea)

View File

@ -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

View File

@ -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