Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Test invalid chars in expression
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Čihař <[email protected]>
  • Loading branch information
nijel committed Oct 12, 2016
1 parent f3a5ddf commit a706f7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Expression.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public static function factory($value) {
return new Expressions\OperatorAnd($value);
}

throw new \Exception('Undefined Value ' . $value);
throw new \RuntimeException('Undefined Value ' . $value);
}

abstract public function operate(Stack $stack, $variables=array());
Expand Down
1 change: 1 addition & 0 deletions tests/CalculateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ public function errorEquations()
array('1 + (1 : 2)'),
array('(1 + 2'),
array('1 + 2)'),
array('#'),
);
}
}

0 comments on commit a706f7c

Please sign in to comment.