Search Unity

[Feature Request] Reporting crashes, but not exception?

Discussion in 'Unity Cloud Diagnostics' started by dgoyette, Jun 28, 2019.

  1. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    1,867
    I have an exception handler built into my game, which opens a feedback dialog so my users can tell me what was happening when the error occurs. This intercepts unhandled exceptions, but not crashes.

    I'd like to enable Crash Reporting for my project, but I see that it also logs all exceptions, which I don't want.

    I don't see any way to tease those two things apart with crash reporting. Is there some way to just get crash reporting without exception reporting?

    Thanks.
     
  2. ryanc-unity

    ryanc-unity

    Unity Technologies

    Joined:
    Mar 23, 2016
    Posts:
    1,143
    Hi @dgoyette, sorry for the late response. That's awesome that you built your own exception handler! Do you mind if I ask why you decided to write your own instead of using Cloud Diagnostics for handling both exceptions and crashes?

    At the moment, there is no way to have only one type of report be logged from your users. Now you can choose to filter your Dashboard view so that you are only shown crash-type reports if you'd like. But the exceptions that are sent out would still count towards your quota so it might not be worthwhile if you'd rather not catalog exception reports through Cloud Diagnostics, too.
     
  3. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    1,867
    Thanks for the response. Maybe there's some channel for requesting this as a future enhancement?

    To answer your question, there are a few reasons I went with a custom error handler:
    • I wanted the ability to pop up a feedback dialog when the crash happened, potentially capturing a screenshot, and allowing the user to explain what was happening when the crash occurred.
    • I wanted the ability to force the game to quit when an exception occurred. This might seem a bit extreme, but I didn't want to risk allowing the user to continue playing after a bad error, potentially corrupting their save game data. So, my error handler intercepts exceptions, pops up a dialog, submits a user report via Cloud Diagnostics, then exits the game after submitting.
    • I also wanted to capture some data when the crash occurred, such as game state, which I include in the Cloud Diagnostics report.
    Maybe that's all possible with the built-in crash & exception handling, but it seemed simple to extend my existing User Feedback dialog to pop up for errors as well.
     
  4. ryanc-unity

    ryanc-unity

    Unity Technologies

    Joined:
    Mar 23, 2016
    Posts:
    1,143
    This is actually the best place to request future features. I marked your thread as a feature request so that the team can review it later.

    • This actually lines up with what the User Reporting aspect of Cloud Diagnostics offers. You can specify via the User Reporting SDK, which you can learn more about here, under what conditions (low frame rate, crash, etc.) to pull up a form. This form can include a written message from the user, along with a screenshot and short video around when the form was prompted, to help you with debugging.
    • I totally understand wanting to make absolutely sure that nothing happens to the user's save data. This is also something that you can specify after a User Report is sent.
    • You can also attach similar game state data in a message field for User Reports.
    Let me know if you have any additional questions.