Message from JavaScript discussions

December 2018

— What happens if a spawned function throws?

— 

It will bubble up naturally until it gets to the last function in the stack, and if that one doesn't catch it than the whole stack is permenently destroyed and the dispatcher itself throws the error

— Uhhhm

— Other stacks aren't affected

— But the error being thrown out of the dispatcher interrupts normal execution, which means it does affect them indirectly

Message permanent page

— 

try {
spawn f();
} catch (e) {}

— This doesn't work, right?

— Right, it doesn't

— Because that spawn moves on

— Rather the control flow moves on

— Right, so it bubbles to the uppermost spawned function?

— Right