static void CollectError(MemoryDatabase<string, long> collection, Exception e) { collection.AddOrUpdate(e.Message, 1, l => l + 1); }