Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/xstate/src/reportUnhandledError.ts>reportUnhandledError

State machines and statecharts for the modern web.
Go to Latest
function reportUnhandledError
import { reportUnhandledError } from "https://deno.land/x/xstate@xstate%405.0.0-beta.23/src/reportUnhandledError.ts";

This function makes sure that unhandled errors are thrown in a separate macrotask. It allows those errors to be detected by global error handlers and reported to bug tracking services without interrupting our own stack of execution.

Parameters

err: unknown

error to be thrown