discontinuedPackage fluttersdk_telescope has been discontinued and replaced by crumbs.

redactExceptionRecord static method

ExceptionRecord? redactExceptionRecord(
  1. ExceptionRecord record
)

Return record with every text field run through the redactor and redacted set, or record itself when none is registered. Returns null, the record dropped, when the redactor throws.

Implementation

static ExceptionRecord? redactExceptionRecord(ExceptionRecord record) {
  final String Function(String)? redact = _guardedRedactor();
  if (redact == null) return record;

  return _dropOnRedactorFailure(
    () => _markRedacted(
      ExceptionRecord(
        exceptionType: redact(record.exceptionType),
        message: redact(record.message),
        time: record.time,
        stackTrace: _text(record.stackTrace, redact),
        isolate: _text(record.isolate, redact),
      ),
    ),
  );
}