<p dir="auto">it would be nice to have Deno catch any unhandled errors</p>
<p dir="auto">e.g.</p>
<p dir="auto"><code class="notranslate">Deno.catch(e) { console.error(e); }</code></p>
<p dir="auto">I was looking for an equivalent to the Node.js "unhandledrejection" event in Deno, but it appears there isn't one on <code class="notranslate">globalThis</code>.</p>
<p dir="auto">There does appear to be an <code class="notranslate">onunhandledrejection</code> event handler <a href="https://github.com/denoland/deno/blob/master/cli/dts/lib.webworker.d.ts#L5468">defined on workers</a>, though.</p>
<p dir="auto">Is there an equivalent event outside of workers, and if not, could there be? <g-emoji class="g-emoji" alias="smile" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f604.png">😄</g-emoji></p>