HGCommunity / R-Fiddler

A Resonite mod that provides real-time notifications for external asset requests.
MIT License
1 stars 0 forks source link

Possible error #1

Closed Nytra closed 2 months ago

Nytra commented 2 months ago

I think this will throw an exception because ex is not a string. I could be wrong though.

https://github.com/HGCommunity/R-Fiddler/blob/73a81f8ced6272f7cc1431b8e28933209a29b69f/ResoFiddler/ResoFiddler.cs#L172

https://github.com/HGCommunity/R-Fiddler/blob/73a81f8ced6272f7cc1431b8e28933209a29b69f/ResoFiddler/ResoFiddler.cs#L191

knackrack615 commented 2 months ago

It doesn't, here's an example exception that happened during development when we forgot to nullcheck the worldThumbnail

1:30:37 AM.177 ( 58 FPS)    [INFO] [ResoniteModLoader/ResoniteFiddler] Error adding notification: System.ArgumentNullException: Value cannot be null.
Parameter name: uriString
  at System.Uri..ctor (System.String uriString) [0x00009] in <ef151b6abb5d474cb2c1cb8906a8b5a4>:0 
  at PrivacyNotif.PrivacyNotif+<AddNotification>d__24.MoveNext () [0x002b5] in <532708fb2ff74f708a04e4728fcbde34>:0 

Should probably switch them to Error instead of Msg though, so thanks for the heads up!