reportCrash method
void
reportCrash(
- Exception exception,
- Severity severity, {
- StackTrace? stack,
- Map<
String, dynamic> customProperties = const {},
Implementation
void reportCrash(Exception exception, Severity severity, {StackTrace? stack, Map<String, dynamic> customProperties = const {} }) async
{
print("Reporting Crash");
String stacktrace = stack == null ? StackTrace.current.toString() : stack
.toString();
HashMap<String, String?> requestData = await returnPostData(exception, stacktrace, severity, CrashType.HANDLED, customProperties);
if (_initialisationCompleted) {
print("Initialisation completed, sending request");
_sendRequest("crash", requestData);
}
else
{
print("Initialisation not completed added to queue");
CrashCatch._crashQueue.add(requestData);
}
}