Sign In Register

How can we help you today?

Start a new topic

GameSparks Unity SDK eats our exceptions

Hello,


since the last update many of our exceptions appear as debug logs. I found this piece of code:

   

if (a != null) {
	try {
		a ();
	} catch (Exception e) {
		if (ExceptionReporter != null) {
			ExceptionReporter (e);
		} else {
			Debug.Log (e);
		}
	}
}

What is the correct way to set the ExceptionReporter? How is it meant to work?

Why is this not documented and why does this not appear in the change logs?


Best

David


1 person has this question

It would be nice to have some information here :)

bump?

Hi guys,


I'll check in on this with the SDK team.


Liam

The main problem here is:

ExceptionReporter is public in the PlatformBase class but is not defined in the IGSPlatform interface.
To set the Exception reporter we cast the GS.GSPlatform to PlatformBase atm but it would be nice to have it defined in the interface.

 

var platform = GS.GSPlatform as PlatformBase;

                if(platform != null)
                {
                    platform.ExceptionReporter += Debug.LogException;
                }

 

It is really a problem that such changes are not listed in the SDK changelog. You guys did a better job documentating changes back then.


1 person likes this

Bump :)

Bumpety bump bump

bump?

Bump!

bump

Still happening for me

It's been 5 months!


1 person likes this
Login to post a comment