SGA-A / c2c

Source code for the custom app exclusive to cc, where most interactions begin and end.
MIT License
1 stars 0 forks source link

Use local cog error handlers where necessary #111

Open SGA-A opened 5 months ago

SGA-A commented 5 months ago

Is your feature request related to a problem? Please describe. Often, use of a single global error handler is unhelpful because it doesn't display much about why the error occured. This issue addresses this.

Describe the solution you'd like A simple solution of just implementing cog error handlers. These are defined within the cog itself and are only called when errors are propagated via the cog.

SGA-A commented 4 months ago

Currently I have not seen a use for this at all yet, the way errors are handled are fine as-is. The only reason I could see this being used is to create custom error types, but that's not part of this issue and not really a need as of right now.

SGA-A commented 4 months ago

Currently I have not seen a use for this at all yet, the way errors are handled are fine as-is. The only reason I could see this being used is to create custom error types, but that's not part of this issue and not really a need as of right now.

Speaking about the topic of custom error handlers, it would be nice if, when raising it, I could provide the reason as the embed description that is shown on the error message in the Discord UI. This is already done in some places for builtin error handlers using the try-except clause, but I'd like to change that.

SGA-A commented 3 months ago

Need to think more about this for the time being, leaving it open

SGA-A commented 1 month ago

The only reason I could see this being used is to create custom error types, but that's not part of this issue and not really a need as of right now.

I cannot see a use case as of right now where this would be needed, maybe it'd be helpful if we plan on having multiple custom errors but I don't really see the problem with a single custom error being responsible for catching all errors that are custom.