enqueueError method
入队一条聚合异常 / Enqueue an aggregated error
同一崩溃的每次重复命中都入队,按 id 覆盖写后只保留计数最高的最新状态。 Every repeat hit of the same crash enqueues; the id-keyed overwrite keeps the newest state (highest count).
Implementation
void enqueueError(ErrorRecord e) {
if (!_enabled) return;
_pendingErrors.remove(e.id);
_pendingErrors[e.id] = e;
if (_pendingErrors.length >= _flushThreshold) flush();
}