{"action":"created","issue":{"url":"https://api.github.com/repos/dart-lang/sdk/issues/19034","labels_url":"https://api.github.com/repos/dart-lang/sdk/issues/19034/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/sdk/issues/19034/comments","events_url":"https://api.github.com/repos/dart-lang/sdk/issues/19034/events","html_url":"https://github.com/dart-lang/sdk/issues/19034","id":84580373,"number":19034,"title":"VM prints \"uncaught error\" even when the error is caught","user":{"login":"peter-ahe-google","id":5689005,"avatar_url":"https://avatars.githubusercontent.com/u/5689005?v=3","gravatar_id":"","url":"https://api.github.com/users/peter-ahe-google","html_url":"https://github.com/peter-ahe-google","followers_url":"https://api.github.com/users/peter-ahe-google/followers","following_url":"https://api.github.com/users/peter-ahe-google/following{/other_user}","gists_url":"https://api.github.com/users/peter-ahe-google/gists{/gist_id}","starred_url":"https://api.github.com/users/peter-ahe-google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peter-ahe-google/subscriptions","organizations_url":"https://api.github.com/users/peter-ahe-google/orgs","repos_url":"https://api.github.com/users/peter-ahe-google/repos","events_url":"https://api.github.com/users/peter-ahe-google/events{/privacy}","received_events_url":"https://api.github.com/users/peter-ahe-google/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dart-lang/sdk/labels/Area-Library","name":"Area-Library","color":"ededed"},{"url":"https://api.github.com/repos/dart-lang/sdk/labels/Library-Isolate","name":"Library-Isolate","color":"ededed"},{"url":"https://api.github.com/repos/dart-lang/sdk/labels/Priority-Unassigned","name":"Priority-Unassigned","color":"ededed"},{"url":"https://api.github.com/repos/dart-lang/sdk/labels/Triaged","name":"Triaged","color":"ededed"},{"url":"https://api.github.com/repos/dart-lang/sdk/labels/Type-Defect","name":"Type-Defect","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2014-05-27T10:21:22Z","updated_at":"2015-09-11T11:29:12Z","closed_at":"2015-09-11T11:29:12Z","body":"Consider tests/isolate/spawn_uri_missing_test.dart:\n\nimport 'dart:isolate';\n\nimport 'dart:async';\n\nimport 'package:async_helper/async_helper.dart';\n\nconst UNEXPECTED_MESSAGE = 'Created isolate from missing file.';\n\nFuture doTest() {\n&nbsp;&nbsp;return Isolate.spawnUri(Uri.base.resolve('no_such_file'), [], null)\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.then((Isolate isolate) {\n&nbsp;&nbsp;&nbsp;&nbsp;throw UNEXPECTED_MESSAGE;\n&nbsp;&nbsp;}).catchError((error) {\n&nbsp;&nbsp;&nbsp;&nbsp;if (error == UNEXPECTED_MESSAGE) throw error;\n&nbsp;&nbsp;&nbsp;&nbsp;print('An error was thrown as expected');\n&nbsp;&nbsp;&nbsp;&nbsp;return null;\n&nbsp;&nbsp;});\n}\n\nmain() {\n&nbsp;&nbsp;asyncTest(doTest);\n}\n\nWhen invoked on the standalone VM, this error message is printed:\n\nUncaught Error: FileSystemException: Cannot open file, path = '/Users/ahe/Dart/all/dart/no_such_file' (OS Error: No such file or directory, errno = 2)\nStack Trace: \n#­0      \\_File.open.&lt;anonymous closure&gt; (dart:io/file_impl.dart:349)\n#­1      \\_rootRunUnary (dart:async/zone.dart:730)\n#­2      \\_RootZone.runUnary (dart:async/zone.dart:864)\n#­3      \\_Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:488)\n#­4      \\_Future._propagateToListeners (dart:async/future_impl.dart:571)\n#­5      \\_Future._completeWithValue (dart:async/future_impl.dart:331)\n#­6      \\_Future._asyncComplete.&lt;anonymous closure&gt; (dart:async/future_impl.dart:393)\n#­7      \\_asyncRunCallbackLoop (dart:async/schedule_microtask.dart:23)\n#­8      \\_asyncRunCallback (dart:async/schedule_microtask.dart:32)\n#­9      \\_RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:128)\n\nHowever, the error is caught using catchError, and nothing should be printed."},"comment":{"url":"https://api.github.com/repos/dart-lang/sdk/issues/comments/139520007","html_url":"https://github.com/dart-lang/sdk/issues/19034#issuecomment-139520007","issue_url":"https://api.github.com/repos/dart-lang/sdk/issues/19034","id":139520007,"user":{"login":"lrhn","id":4865287,"avatar_url":"https://avatars.githubusercontent.com/u/4865287?v=3","gravatar_id":"","url":"https://api.github.com/users/lrhn","html_url":"https://github.com/lrhn","followers_url":"https://api.github.com/users/lrhn/followers","following_url":"https://api.github.com/users/lrhn/following{/other_user}","gists_url":"https://api.github.com/users/lrhn/gists{/gist_id}","starred_url":"https://api.github.com/users/lrhn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lrhn/subscriptions","organizations_url":"https://api.github.com/users/lrhn/orgs","repos_url":"https://api.github.com/users/lrhn/repos","events_url":"https://api.github.com/users/lrhn/events{/privacy}","received_events_url":"https://api.github.com/users/lrhn/received_events","type":"User","site_admin":false},"created_at":"2015-09-11T11:29:12Z","updated_at":"2015-09-11T11:29:12Z","body":"I no longer see the error message, so assuming this has been fixed."}}