notify method
Future<void>
notify(
- dynamic error,
- StackTrace stackTrace, {
- ErrorSeverity severity = ErrorSeverity.error,
Send error
and stackTrace
to bugsnag
try {
throw Error('Application error.');
} catch (error, stackTrace) {
bugsnagNotifierInstance.notify(error, stackTrace)
}
Implementation
Future<void> notify(
dynamic error,
StackTrace stackTrace, {
ErrorSeverity severity = ErrorSeverity.error,
}) async {
Map<String, dynamic> errors = {
'errorClass': error.runtimeType.toString(),
'message': error.toString(),
'stacktrace': this._parseStackTrace(stackTrace),
};
await this._sendError([errors], severity);
}