Error codesAsync

An `@catch` is written without an `@try` before it

MARKLESS_ASYNC_CATCH_WITHOUT_TRYerrorMarkless raises it while it builds your .tsrx files.

The message

MARKLESS_ASYNC_CATCH_WITHOUT_TRY: This `@catch` follows an element, not an @try block, so it is not read as a catch arm. TSRX parses it as literal text, and the block after it as a separate expression, so the page would show the words "@catch" and render the block as ordinary content.
An `@catch` arm belongs to the `@try` block written directly before it. Without one there is no block for it to catch errors from, and building it anyway would ship visible text instead of failing.
Wrap the content that can fail in an @try and put the arm after it: `@try { ... } @catch (error) { ... }`.
https://markless.dev/errors/MARKLESS_ASYNC_CATCH_WITHOUT_TRY

Why

An `@catch` arm belongs to the `@try` block written directly before it. Without one there is no block for it to catch errors from, and building it anyway would ship visible text instead of failing.

Fix

Wrap the content that can fail in an @try and put the arm after it: `@try { ... } @catch (error) { ... }`.

Where Markless raises it

All error codes