1
0
mirror of synced 2026-01-22 09:02:55 -05:00
Files
docs/src/content-render/liquid/error-handling.js
2023-07-11 11:44:52 +00:00

11 lines
425 B
JavaScript

// If 'THROW_ON_EMPTY' is set and it's value is '0' or 'false' it becomes
// false. Or true if it's 'true' or '1'.
export const THROW_ON_EMPTY = Boolean(
process.env.THROW_ON_EMPTY
? JSON.parse(process.env.THROW_ON_EMPTY)
: JSON.parse(process.env.CI || process.env.NODE_ENV !== 'production'),
)
export class DataReferenceError extends Error {}
export class IndentedDataReferenceError extends DataReferenceError {}