Question:
Does anyone know why a message might be logged as an Exception LogType while in the Editor, but in a deployed build on iOS or Android that same message would be logged as an Error type?
Backstory:
I've recently added HockeyApp's [iOS](https://github.com/bitstadium/HockeySDK-Unity-iOS) and [Android](https://github.com/bitstadium/HockeySDK-Unity-Android) Unity SDK's to my project for purposes of error logging. Initially, the app wasn't uploading any logs, so I worked with HockeyApp support, and with the help of a project I sent them, they identified that the Divide by Zero exception I was using to test was being logged as an Error type and not an Exception. They went on to suggest that I comment out a portion of their script:
`if(LogType.Assert != type && LogType.Exception != type)
{
return;
}`
This is clearly meant to catch Exception type messages and nothing else, so with that commented out it will (and does) upload _everything_ from the app, including our own debug message logging if left enabled in the build.
HockeyApp support couldn't give us a lead on why the message LogType changes from the Editor to a deployed build. For example, while in the editor testing my app, or in HockeyApp's example app in the editor and deployed, a divide by zero reports a description of...
>DivideByZeroException: Division by zero >at TestUI.OnGUI () (at [...]HockeySDK-Unity-Android-master/ExampleGame/Assets/TestUI/TestUI.cs:59)
...and is logged as such in the HockeyApp dashboard, including the entire stack trace. But in a deployed build of my game, a divide by zero is logged like this...>Division by zero
...with no other detail. The result of all this appears to be that unless LogType = Exception, no other detail is provided in the message other than the error description. No stack trace of any kind, which makes it pretty useless for troubleshooting.
↧