Skip to content

Commit

Permalink
refactor: replace some exception types
Browse files Browse the repository at this point in the history
  • Loading branch information
thegamecracks committed Jul 3, 2024
1 parent af36ced commit 08ebf0f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/theticketbot/cogs/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ async def handle(self, ctx: T, error: Exception, /) -> None:
content = await resp.format(ctx, error)
break
else:
raise ValueError(f"Unable to handle exception: {error!r}")
raise TypeError(f"Unable to handle exception: {error!r}")

if resp.show_traceback:
self._log_error(ctx, error, error_code)
Expand Down
2 changes: 1 addition & 1 deletion src/theticketbot/cogs/inbox/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def mention_to_snowflake(mention: str) -> discord.Object:
return discord.Object(int(m[2]), type=discord.User)
elif m[1] == "@&":
return discord.Object(int(m[2]), type=discord.Role)
raise RuntimeError(f"Unsupported mention type {m[1]!r}")
raise ValueError(f"Unsupported mention type {m[1]!r}")


class InboxView(discord.ui.View):
Expand Down

0 comments on commit 08ebf0f

Please sign in to comment.