Why this matters
Complete telemetry accelerates triage and grouping in log systems.
Use `catch (e, stack)` and log both exception and stack; do not log message-only.
Complete telemetry accelerates triage and grouping in log systems.
Side-by-side examples engineers can pattern-match during review.
catch (e) { debugPrint('failed: $e'); }catch (e, st) { logger.severe('operation failed', e, st); }catch (e) { print(e); }catch (e, st) { logger.severe('x', e, st); }From the same buckets as this rule.
Check if loops use equality operators (== or !=) in termination conditions. These can lead to infinite loops if the condition is never met exactly. Instead, use relational operators like < or > for safer loop termination.