Incapamentum / Exalted-Sage

Discord bot that does API requests to retrieve a collection of daily achievements for the next day and pushes an alert when any that is in a watchlist shows up.
3 stars 0 forks source link

Unhandled Exceptions Tracker #13

Closed Incapamentum closed 1 year ago

Incapamentum commented 1 year ago

For the time being, this will be used as a way to keep track of any unhandled exceptions the bot handles. The original intent was to further future-proof through exception handling, but difficult to do if you're not quite sure yet of the errors that may be thrown.

This may become a stupid method of keeping track of such things, but I currently can't think of a better way.

Incapamentum commented 1 year ago

One uncaught error is a System.NullReferenceException being thrown in the MessageReceived handler. It is specifically being thrown on this line.

I still have no idea on what exactly may be the cause of it, but as far as I can tell, it hasn't happened since.

Uncaught_MessageReceived_NullRef

Incapamentum commented 1 year ago

Seems another uncaught error has popped up. This one seems to be easier to explain versus the previous one. A System.ArgumentNullException is being thrown in the UserVoiceStateUpdated handler, which is powered by VoiceEventHandler.

The error seems a bit vague, too, since it's saying it is occurring on line 88, but seems it just happens in the ResetVoiceChannelName() method on this line. Likely, the error is being thrown since it is attempting to rename the Meta voice channel, but it is not one of the channels whose name will get defaulted, so an empty reference is being returned.

This can be a quick and easy fix, and a new branch/PR will be opened to deal with it. As such, this comment will be edited to reflect that as well.

Uncaught_UserVoice_ArgumentNullException

Incapamentum commented 1 year ago

I'll be closing out this issue as it's perhaps better to instead just keep track of each issue individually as opposed to having one mega-issue.

New issues will be opened for the two current issues that have yet to be resolved.