Updated to print stacktrace in event of error

This commit is contained in:
Anon 2024-01-03 09:03:10 -08:00
parent af2e4df3dc
commit 0e7f9d1ffa

View File

@ -25,6 +25,7 @@ import FediBot
import importlib import importlib
import magic import magic
import copy import copy
import traceback
class FileTooLarge(Exception): class FileTooLarge(Exception):
pass pass
@ -153,10 +154,10 @@ class YandereBot(FediBot.YandereBot):
spoiler = picked["nsfw"] spoiler = picked["nsfw"]
message = self.get_message(picked) message = self.get_message(picked)
return { return {
"picked": picked, "picked": picked,
"media_list": media_list, "media_list": media_list,
"spoiler": spoiler, "spoiler": spoiler,
"message": message, "message": message,
"x": x, "x": x,
"y": y "y": y
} }
@ -192,6 +193,8 @@ class YandereBot(FediBot.YandereBot):
# Other Exceptions # Other Exceptions
except Exception as e: except Exception as e:
print("Unhandled exception", e) print("Unhandled exception", e)
traceback.print_exc()
print("-"*80)
self.handle_post_exception() self.handle_post_exception()