// this causes an unhandled rejection after sleep(1) expires because keepalive is not set sleep(1).then(() => ocx.println('printing later!')); // this does not cause an unhandled rejection after sleep(1) expires because keepalive is set keepalive(); sleep(1).then(() => ocx.println('printing later!')); // this does not cause an unhandled rejection after sleep(1) expires because the error is handled sleep(1).then(() => ocx.println('printing later!')).catch(render_error); ### the javascript code causes an unhandled rejection after sleep(1) expires because keepalive is not set *... with math:* $$ x = \frac{-b \pm \sqrt{b^2 - 4 a c}}{2 a} $$ *... with code:* ```!$ javascript sleep(1).then(() => ocx.println('printing later!')); ``` ### the javascript code does not cause an unhandled rejection after sleep(1) expires because keepalive is set *... with math:* $$ x = \frac{-b \pm \sqrt{b^2 - 4 a c}}{2 a} $$ *... with code:* ```!$ javascript keepalive(); sleep(1).then(() => ocx.println('printing later!')); ``` ### the javascript code does not cause an unhandled rejection after sleep(1) expires because the error is handled *... with math:* $$ x = \frac{-b \pm \sqrt{b^2 - 4 a c}}{2 a} $$ *... with code:* ```!$ javascript sleep(1).then(() => ocx.println('printing later!')).catch(render_error); ```