{"action":"opened","issue":{"url":"https://api.github.com/repos/angular/angular.dart/issues/1739","labels_url":"https://api.github.com/repos/angular/angular.dart/issues/1739/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular.dart/issues/1739/comments","events_url":"https://api.github.com/repos/angular/angular.dart/issues/1739/events","html_url":"https://github.com/angular/angular.dart/issues/1739","id":108020713,"number":1739,"title":"mock/zone.dart  Assertion that _asyncErrors.isEmpty makes debugging in checked mode difficult","user":{"login":"kharland","id":3987220,"avatar_url":"https://avatars.githubusercontent.com/u/3987220?v=3","gravatar_id":"","url":"https://api.github.com/users/kharland","html_url":"https://github.com/kharland","followers_url":"https://api.github.com/users/kharland/followers","following_url":"https://api.github.com/users/kharland/following{/other_user}","gists_url":"https://api.github.com/users/kharland/gists{/gist_id}","starred_url":"https://api.github.com/users/kharland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kharland/subscriptions","organizations_url":"https://api.github.com/users/kharland/orgs","repos_url":"https://api.github.com/users/kharland/repos","events_url":"https://api.github.com/users/kharland/events{/privacy}","received_events_url":"https://api.github.com/users/kharland/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-23T22:35:36Z","updated_at":"2015-09-23T22:35:36Z","closed_at":null,"body":"From: angular.dart/lib/mock/zone.dart : microLeap, line 50\r\n\r\n```dart\r\nmicroLeap() {\r\n  while (_asyncQueue.isNotEmpty) {\r\n    // copy the queue as it may change.\r\n    var toRun = new List.from(_asyncQueue);\r\n    _asyncQueue.clear();\r\n    // TODO: Support the case where multiple exceptions are thrown.\r\n    // e.g. with a throwNextException() method.\r\n    assert(_asyncErrors.isEmpty);\r\n    toRun.forEach((fn) => fn());\r\n    if (_asyncErrors.isNotEmpty) {\r\n      var e = _asyncErrors.removeAt(0);\r\n      throw ['Async error', e[0], e[1]];\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nWhen run in checked mode, the errors from `_asyncErrors` are never re-thrown which makes debugging difficult.  Is this assertion necessary?"}}