rehlma / flutter-preserve-error-contextr1
Preserve the error and its stack trace
PublicCatch with error and stackTrace, and forward both through the logger’s named arguments.
Preserve the error and its stack trace
Catch with error and stackTrace, and forward both through the logger’s named arguments.
Use catch (error, stackTrace) and a call such as chirp.error('Loading failed', error: error, stackTrace: stackTrace) with the project's actual logger.
Do not replace structured error arguments with string interpolation.
The detector checks single-line catch declarations; reviewing logger arguments and multiline catches is still necessary.
Detection scope
This detector recognizes specific textual patterns; it is not a complete semantic analyzer. Explicit user instructions and applicable repository conventions take precedence.