import { createSignal, onCleanup, onMount } from "solid-js"; import { TerminalErrorPage } from "~/components/TerminalErrorPage"; import { glitchText } from "~/lib/client-utils"; export interface ErrorBoundaryFallbackProps { error: Error; reset: () => void; } export default function ErrorBoundaryFallback( props: ErrorBoundaryFallbackProps ) { const [glitchError, setGlitchError] = createSignal("ERROR"); onMount(() => { const interval = glitchText(glitchError(), setGlitchError); onCleanup(() => { clearInterval(interval); }); }); const errorContent = (
fatal: Unhandled Runtime Exception
✗
{glitchError()}
Application encountered an unexpected error
{props.error.message && (
Message:
{props.error.message}
)} {props.error.stack && (
Stack trace:
{props.error.stack}
)}
ℹ Type help to see available commands, or try one of the suggestions below
); const quickActions = ( <> ); return ( ERR |{" "} Runtime Exception } /> ); }