mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-27 13:34:28 +00:00
Use crabs for errors
This commit is contained in:
parent
2f41a9bf9e
commit
1c5ce6502f
2 changed files with 3 additions and 3 deletions
|
@ -126,10 +126,10 @@ class DiscordBot(GenericBot):
|
||||||
f"Syntax: [c]/{command.name} {command.syntax}[/c]")
|
f"Syntax: [c]/{command.name} {command.syntax}[/c]")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
sentry_sdk.capture_exception(e)
|
sentry_sdk.capture_exception(e)
|
||||||
error_message = f"{e.__class__.__name__}\n"
|
error_message = f"🦀 {e.__class__.__name__} 🦀\n"
|
||||||
error_message += '\n'.join(e.args)
|
error_message += '\n'.join(e.args)
|
||||||
log.error(f"Error in {command.name}: {error_message}")
|
log.error(f"Error in {command.name}: {error_message}")
|
||||||
await data.reply(f"⛔️ {error_message}")
|
await data.reply(f"{error_message}")
|
||||||
if __debug__:
|
if __debug__:
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
|
|
@ -178,7 +178,7 @@ class TelegramBot(GenericBot):
|
||||||
f"Syntax: [c]/{command.name} {command.syntax}[/c]")
|
f"Syntax: [c]/{command.name} {command.syntax}[/c]")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
sentry_sdk.capture_exception(e)
|
sentry_sdk.capture_exception(e)
|
||||||
error_message = f"⛔️ [b]{e.__class__.__name__}[/b]\n"
|
error_message = f"🦀 [b]{e.__class__.__name__}[/b] 🦀\n"
|
||||||
error_message += '\n'.join(e.args)
|
error_message += '\n'.join(e.args)
|
||||||
await data.reply(error_message)
|
await data.reply(error_message)
|
||||||
if __debug__:
|
if __debug__:
|
||||||
|
|
Loading…
Reference in a new issue