How to upload crash report manually?

Hi,

We are happy users of Cloud Diagnostics in our desktop game. As it is available to players, we try to avoid crashes - that’s why sometimes we do error handling, like null-checks or try/catch blocks.

Unfortunately, as far as I understand, If there is no Exception (or if an exception is handled in a try/catch block), then report to Cloud Diagnostics will not be sent.

We have many players. If for one of them the game save file will break, it is a critical error, because the player will lose all his progress. In such a case, we will show him error popup, and still let him play the new game. We want to upload a crash report for such a situation (because it is a significant error). Unfortunately, the only way I know to do that is sending unhandled exception (which, as far as I understand, could easily break anything in the game).

Is there any way to send a crash report via “normal” Upload function instead of using unhandled exceptions?

Hi @FrozenDistrict , I’m glad to hear that you enjoy using Cloud Diagnostics! :smile:

If you’d like to send an Exception report without interrupting the flow of your code then you can use the following line of code to do that:

Debug.LogException(new Exception(“”));

Then you can replace the Exception Message with whatever info you’d like to pass along with the stack trace in the report.

3 Likes

Hi ryanc!
Our game has an exception handling system, but we also want cloud diagnostics. So we have the same problem. But Debug.LogException is not sent to the cloud diagnostics in the editor environment, the unhandled exception will be sent. Debug.LogException Can it really be captured by cloud diagnostics?

I found that I had made a stupid mistake. Cloud diagnostics shows on, but not actually on. it’s ok.