logError function
- Object error,
- StackTrace? stackTrace, {
- 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');
}
}