You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've come up with a minimum viable example that shows my problem below. For some reason, print('Error occured: $e'); is never called. Instead I get Unhandled Exception: Exception. I can't understand why the error handler on the channel in the main function isn't picking up this error. Is this a bug?
import'dart:isolate';
import'package:stream_channel/isolate_channel.dart';
voidmain() async {
var rp =ReceivePort();
var channel =IsolateChannel.connectReceive(rp);
channel.stream.listen(print);
channel.stream.handleError((e) {
print('Error occured: $e');
});
awaitIsolate.spawn(task, rp.sendPort);
}
voidtask(SendPort sp) {
var channel =IsolateChannel.connectSend(sp);
channel.sink.add('Hello');
channel.sink.addError(Exception());
}
The text was updated successfully, but these errors were encountered:
I've come up with a minimum viable example that shows my problem below. For some reason,
print('Error occured: $e');
is never called. Instead I getUnhandled Exception: Exception
. I can't understand why the error handler on thechannel
in themain
function isn't picking up this error. Is this a bug?The text was updated successfully, but these errors were encountered: