spawnFunction with isolate exception handler never catches IsolateUnhandledException #11505
Labels
area-core-library
SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.
closed-obsolete
Closed as the reported issue is no longer relevant
This issue was originally filed by @chrisbu
What steps will reproduce the problem?
http://stackoverflow.com/questions/17292762/dart-unhandledexceptioncallback-is-ignored
import 'dart:isolate';
void isolateMain() {
throw new Exception("ouch");
}
bool handleException(IsolateUnhandledException e) {
print("EXCEPTION in isolate: " + e.toString());
return true;
}
void main() {
SendPort sendPort = spawnFunction(isolateMain, handleException);
sendPort.call("Hello").then((e) {
print("Main received " + e);
});
}
What is the expected output? What do you see instead?
Expect handleException to be called.
What version of the product are you using? On what operating system?
Dart VM version: 0.5.20.4_r24275 (Fri Jun 21 05:02:50 2013) on "macos_x64"
Please provide any additional information below.
Taken from SO question:
http://stackoverflow.com/questions/17292762/dart-unhandledexceptioncallback-is-ignored
which was raised in response to SO question:
http://stackoverflow.com/questions/17271178/dart-web-server-prevent-crash/17271530#­17271530
The text was updated successfully, but these errors were encountered: