reportException static method
void
reportException(
- Object error, [
- StackTrace? stackTrace,
- Map<
String, dynamic> ? additionalContext
Report a generic exception with full context
Implementation
static void reportException(
Object error, [
StackTrace? stackTrace,
Map<String, dynamic>? additionalContext,
]) {
final context = _buildExceptionContext(
error: error,
stackTrace: stackTrace,
additionalContext: additionalContext,
);
final logMessage = _formatExceptionMessage(error, context);
Khadem.logger.error(logMessage, context: context, stackTrace: stackTrace);
// Send to external service if configured
_sendToExternalService(error, context, stackTrace);
}