8000 Reword exception msg · symfony/symfony@c352c95 · GitHub
[go: up one dir, main page]

Skip to content

Commit c352c95

Browse files
committed
Reword exception msg
1 parent 463434a commit c352c95

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Symfony/Component/ExpressionLanguage/ExpressionLanguage.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,14 @@ public function parse($expression, $names)
110110
* @param callable $compiler A callable able to compile the function
111111
* @param callable $evaluator A callable able to evaluate the function
112112
*
113-
* @throws \LogicException when register a function after calling evaluate/compilate the first time
113+
* @throws \LogicException when register a function after calling evaluate(), compile() or parse() the first time
114114
*
115115
* @see ExpressionFunction
116116
*/
117117
public function register($name, $compiler, $evaluator)
118118
{
119-
if ($this->parser) {
120-
throw new \LogicException('It\'s impossible to register function after calling evaluate/compilate the first time.');
119+
if (null !== $this->parser) {
120+
throw new \LogicException('Registering functions after calling evaluate(), compile() or parse() is not supported.');
121121
}
122122

123123
$this->functions[$name] = array('compiler' => $compiler, 'evaluator' => $evaluator);

0 commit comments

Comments
 (0)
0