recordDartError static method

Future<void> recordDartError(
  1. dynamic exception,
  2. StackTrace stack
)

Callback to catch and report Dart errors, enableCrashReporting() must call before initWithConfig to make it work.

Implementation

static Future<void> recordDartError(exception, StackTrace stack) async {
  log('recordDartError, Error caught by Countly :');
  if (!_enableCrashReportingFlag) {
    log('recordDartError, Crash Reporting must be enabled to report crash on Countly', logLevel: LogLevel.WARNING);
    return;
  }
  _internalRecordError(exception, stack);
}