In order to know why the app crashed at the previous run, we need to record the full exception into a temporary file. There already is such a "checkpoint" file: "$HOME/.nuxeo-drive/crash.state". For now, it is only touched and we only check for its existence at startup. See the code here.
On crash, most of the time the fatal error window is shown with the full stack trace. Just save it into the crash file.
At startup, the app will check the file existence and its content (warning: it may be empty). If the file contains data, save in into State.crash_details and send it in a custom metric app.crashed.trace. That metric should be sent at the same time as app.crashed.hit.
- Is referenced in