logError function

void logError(
  1. Object error,
  2. StackTrace? stackTrace, {
  3. String? context,
})

//////////// //////////// Logs an error with structured information

Implementation

// I.B - Error Handling Utilities
///////////////

/// Logs an error with structured information
void logError(Object error, StackTrace? stackTrace, {String? context}) {
  // In a real implementation, this would integrate with a logging system
  // For now, just print to console
  print('ERROR${context != null ? ' [$context]' : ''}: $error');
  if (stackTrace != null) {
    print('Stack trace: $stackTrace');
  }
}