logExceptionManual static method
Report a handled or unhandled exception/error to Countly.
The exception/error is provided with a string message If no stack trace is provided, StackTrace.current will be used
String message
- the error / crash information sent to the server
bool nonfatal
- reports if the error was fatal or not
StackTrace stacktrace
- stacktrace for the crash
Map<String, Object> segmentation
- allows to add optional segmentation
Implementation
static Future<String?> logExceptionManual(String message, bool nonfatal, {StackTrace? stacktrace, Map<String, Object>? segmentation}) async {
log('Calling "logExceptionManual":[$message] nonfatal:[$nonfatal]');
stacktrace ??= StackTrace.current;
final result = logException('$message\n\n$stacktrace', nonfatal, segmentation);
return result;
}