harttle / liquidjs

A simple, expressive, safe and Shopify compatible template engine in pure JavaScript.
https://liquidjs.com
MIT License
1.5k stars 237 forks source link

feat: support catching all errors, #220 #710

Closed harttle closed 2 months ago

harttle commented 2 months ago

Catching multiple errors before quit when catchAllErrors option is set. However there's some caveats.

  1. It only catches all LiquidError, other errors like code bug are not catched in this way. So you'll need to check err.name === 'LiquidErrors' before using.
  2. Top level tokennization errors are not catched, as there's no such concept of Token during this step. e.g. partial tag {% foo
  3. Render errors should be catched perfectly. e.g. undefined variables, nonexist filters/tags, as well as errors thrown in filters/tags.
github-actions[bot] commented 2 months ago

:tada: This PR is included in version 10.14.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: