ErisApps / CatCore

A shared high-performance chat client library written in .NET Standard 2.0
GNU General Public License v3.0
29 stars 3 forks source link

Added safeguard against ArgumentNullException caused by null channelName parameter #31

Closed ErisApps closed 2 years ago

ErisApps commented 2 years ago

This will drop the message, but log the parameters at least for future investigation...

This was reported by Kinsi with the following stacktrace:


ArgumentNullException: Value cannot be null.
Parameter name: key
  at System.Collections.Generic.Dictionary`2[TKey,TValue].FindEntry (TKey key) [0x00008] in <eae584ce26bc40229c1b1aa476bfa589>:0 
  at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x00000] in <eae584ce26bc40229c1b1aa476bfa589>:0 
  at CatCore.Services.Twitch.TwitchIrcService.HandlePrivMessage (System.Collections.ObjectModel.ReadOnlyDictionary`2[System.String,System.String]& messageMeta, System.String& prefix, System.String& commandType, System.String& channelName, System.String& message, System.Boolean wasSendByLibrary) [0x00014] in <62c860a539574b419da07d8bf11bead6>:0 
  at CatCore.Services.Twitch.TwitchIrcService.HandleParsedIrcMessage (System.Collections.ObjectModel.ReadOnlyDictionary`2[System.String,System.String]& messageMeta, System.String& prefix, System.String& commandType, System.String& channelName, System.String& message, System.Boolean wasSendByLibrary) [0x002b2] in <62c860a539574b419da07d8bf11bead6>:0 
  at CatCore.Services.Twitch.TwitchIrcService.MessageReceivedHandlerInternal (System.String rawMessage, System.Boolean sendBySelf) [0x00053] in <62c860a539574b419da07d8bf11bead6>:0```