pub fn report_unhandled_exception(
exception_type: Option<&str>,
exception_message: Option<&str>,
stacktrace: StackTrace,
) -> Result<(), CrashHandlerError>Expand description
This function is designed to be when a program is at a terminal state and the application wants to report an unhandled exception to the crashtracker If this crashes, then the application will also crash. Ensure that this API is called when the application is at a terminal state and exit quickly after.
This API handles reporting both the crash ping and the crash report for the unhandled exception.
Preconditions:
- The crashtracker must be started
- The stacktrace must be valid
This function will spawn the receiver process and call an emit function to pipe over the crash data. We don’t use the collector process because we are not in a signal handler Rather, we call emit_crashreport directly and pipe over data to the receiver