discord / gamesdk-and-dispatch

Public issue tracker for the Discord Game SDK and Dispatch
22 stars 7 forks source link

[Bug] ResultException in C# API never assigns the Result variable. #8

Open Jump-Suit opened 4 years ago

Jump-Suit commented 4 years ago

Transferred from Dev Feedback:

PacoChan

Hey everyone! I'm experimenting with a simple Discord integration in a game and I found a small bug.

ResultException in C# API never assigns the Result variable, so it always has the Ok value, whatever the actual exception result is.

It's easy to fix though. In Core.cs:

public ResultException(Result result) : base(result.ToString()) { Result = result; //Add this }

Have a nice day.

MaikelChan commented 4 years ago

Hi! I'm the one that reported this issue on dev feedback. Any news? It's just adding a simple line of code.

rzubek commented 3 years ago

+1, right now ResultException always reports "Result == OK", even when the result should be something meaningful like NotRunning or NotInstalled.

It looks like Core.cs is autogenerated from another source? In which case the generator for ResultException needs to be fixed.