From 584ceeb02f19c465940604e24625196a3bcdbd61 Mon Sep 17 00:00:00 2001 From: Joe Date: Mon, 3 Jul 2023 18:14:54 -0700 Subject: [PATCH] chore(dsl): add Error suffix to ExcessiveOptionalNestingError --- src/dsl/syntax/untrusted.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dsl/syntax/untrusted.ts b/src/dsl/syntax/untrusted.ts index 12c5ac2..198adfd 100644 --- a/src/dsl/syntax/untrusted.ts +++ b/src/dsl/syntax/untrusted.ts @@ -40,7 +40,7 @@ export function parseUntrustedPattern( const depth = determineOptionalNestingDepth(ast); if (depth > maxOptionalNestingDepth) { - throw new ExcessiveOptionalNesting(pattern, maxOptionalNestingDepth, depth); + throw new ExcessiveOptionalNestingError(pattern, maxOptionalNestingDepth, depth); } return ast; } @@ -102,7 +102,7 @@ export function determineOptionalNestingDepth(ast: Ast) { return ast.nodes.reduce((max, node) => Math.max(max, visit(node)), 0); } -export class ExcessiveOptionalNesting extends Error { +export class ExcessiveOptionalNestingError extends Error { public readonly pattern: string; public readonly depthLimit: number; public readonly actualDepth: number;