recordError static method
Manually records a caught error or exception.
Implementation
static void recordError(
dynamic error,
StackTrace? stack, {
String? reason,
bool fatal = false,
}) {
final effectiveError = (reason != null && reason.isNotEmpty)
? '$error (Reason: $reason)'
: error;
scheduleMicrotask(() {
_captureException(effectiveError as Object, stack ?? StackTrace.current);
});
}