onTlException static method

Future<void> onTlException({
  1. required Map data,
})

For global unhandled exception

Implementation

static Future<void> onTlException(
    {required Map<dynamic, dynamic> data}) async {
  try {
    await _channel.invokeMethod('exception', data);
  } on PlatformException catch (pe) {
    tlLogger.v(
        'Unable to log app exception: ${pe.message}, stack: ${pe.stacktrace}');
    throw TealeafException(pe, msg: TealeafException.logErrorMsg);
  }
}