For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /examples/error-handling.md.

Error Handling

Throw an uncaught error from a tap handler and show the text AngularLynx saved for it on screen. On-screen errors help when no debugger is connected to the phone.

What it shows

  • An uncaught error — the tap handler throws, and nothing catches it. Angular passes it to LynxErrorHandler, which provideRenderer() sets up. In Lynx Explorer, Lynx's error screen opens. See Handling errors.
  • __lynxLastError — a global where LynxErrorHandler saves the last uncaught error's name, message and stack as text. See LynxErrorHandler.
  • Errors in a <text> — a microtask, queued before the throw, copies the saved text into a signal once the handler has saved it. The screen shows it, or "(none)". See Debugging.