DataProcessingException constructor

DataProcessingException({
  1. required String userMessage,
  2. required String devMessage,
  3. Object? data,
  4. String? operation,
  5. Object? cause,
  6. StackTrace? stack,
  7. Map<String, dynamic> metadata = const {},
  8. Severity severity = Severity.error,
  9. bool isReportable = true,
})

Creates a data processing exception, optionally capturing raw input.

Implementation

DataProcessingException({
  required super.userMessage,
  required super.devMessage,
  this.data,
  this.operation,
  super.cause,
  super.stack,
  Map<String, dynamic> metadata = const {},
  super.severity,
  super.isReportable,
}) : super(
        metadata: {
          if (operation != null) 'operation': operation,
          if (data != null) 'rawData': data,
          ...metadata,
        },
      );