Skip to content
This repository was archived by the owner on Nov 15, 2019. It is now read-only.

Commit 5471304

Browse files
committed
Add extensions ast
1 parent c47554a commit 5471304

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Parser/Ast/Builder.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@ protected function rule(string $name, array $children, int $offset)
159159
try {
160160
return $delegate ? new $delegate($rule) : $rule;
161161
} catch (\TypeError $e) {
162-
throw new \LogicException('Error while delegate initialization: ' . $e->getMessage());
162+
$error = \sprintf('Error while %s initialization: %s', $delegate, $e->getMessage());
163+
throw new \LogicException($error);
163164
}
164165
}
165166

0 commit comments

Comments
 (0)