aboutsummaryrefslogtreecommitdiff
path: root/src/NXP/Classes/Calculator.php
diff options
context:
space:
mode:
authorAlexander Kiryukhin <alexander@kiryukhin.su>2018-09-06 20:37:48 +0300
committerGitHub <noreply@github.com>2018-09-06 20:37:48 +0300
commita969571772a9761f67672b229741f209f5391560 (patch)
treed7080eefe3251409d3e4c7dceddf7c3f3738913d /src/NXP/Classes/Calculator.php
parentb04cf54aa3e4d31bcea43011b371c75d168ac7f6 (diff)
parent7db873a63655258bd30ff2d83f186da48f2c50e1 (diff)
Merge pull request #25 from phpfui/Exception_messages
Exception Messages
Diffstat (limited to 'src/NXP/Classes/Calculator.php')
-rw-r--r--src/NXP/Classes/Calculator.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/NXP/Classes/Calculator.php b/src/NXP/Classes/Calculator.php
index 41e0d9f..b584d69 100644
--- a/src/NXP/Classes/Calculator.php
+++ b/src/NXP/Classes/Calculator.php
@@ -40,7 +40,7 @@ class Calculator
if ($token instanceof TokenVariable) {
$variable = $token->getValue();
if (!array_key_exists($variable, $variables)) {
- throw new UnknownVariableException();
+ throw new UnknownVariableException($variable);
}
$value = $variables[$variable];
array_push($stack, new TokenNumber($value));