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:
parent
01402384ac
commit
b13f0c6985
4
bot.py
4
bot.py
|
@ -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__':
|
||||
|
|
Loading…
Reference in a new issue