Observe the following code.
void main() async {
await runZonedGuarded(
() async {
print("a");
throw "error";
},
(e, s) {
print("b");
},
);
print("c");
}
It only prints...
a
b
Instead of ...
a
b
c
If I remove the throw it prints
a
c
Can someone explain what exactly is going on here? Why does c not print in the first case?
Thanks!