1
0
Fork 0
mirror of synced 2024-06-15 00:54:34 +12:00

Changed the order of the printing of errors; some errors aren't providing a traceback and causing the actual error to stop printing

This commit is contained in:
Phxntxm 2016-08-07 06:49:01 -05:00
parent 01402384ac
commit b13f0c6985

4
bot.py
View file

@ -96,9 +96,9 @@ async def on_command_error(error, ctx):
file=f)
try:
traceback.print_tb(error.original.__traceback__, file=f)
print('{0.__class__.__name__}: {0}'.format(error.original), file=f)
except:
pass
print('{0.__class__.__name__}: {0}'.format(error.original), file=f)
print('{0.__class__.__name__}: {0}'.format(error), file=f)
if __name__ == '__main__':