From 4e394b9072915148e7dff1f021c2b605a1166d07 Mon Sep 17 00:00:00 2001 From: Laurin Quast Date: Sat, 1 May 2021 11:35:56 +0200 Subject: [PATCH] feat: export errors for better error handling in user-land --- src/liquid.ts | 1 + src/util/error.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/liquid.ts b/src/liquid.ts index 8bcf9d1ba1..5b8191332b 100644 --- a/src/liquid.ts +++ b/src/liquid.ts @@ -15,6 +15,7 @@ import { FilterImplOptions } from './template/filter/filter-impl-options' import { toPromise, toValue } from './util/async' import { Emitter } from './render/emitter' +export * from './util/error' export * from './types' export class Liquid { diff --git a/src/util/error.ts b/src/util/error.ts index 1caf82e7cf..b1940dd715 100644 --- a/src/util/error.ts +++ b/src/util/error.ts @@ -2,7 +2,7 @@ import * as _ from './underscore' import { Token } from '../tokens/token' import { Template } from '../template/template' -abstract class LiquidError extends Error { +export abstract class LiquidError extends Error { private token: Token private originalError: Error public constructor (err: Error, token: Token) {