aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Wells <brucekwells@gmail.com>2020-07-27 19:25:59 +0300
committerGitHub <noreply@github.com>2020-07-27 19:25:59 +0300
commit44d72cc252974ac36cc138591aac785022760a50 (patch)
treef91391945ab9eea944a785209d6db1698e1529cc /src
parentb38893d672f479314e8b9f254457b8b9755c781f (diff)
Better setVar error message (#70)V2.1.1
Additional unit tests Readme update
Diffstat (limited to 'src')
-rw-r--r--src/NXP/MathExecutor.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/NXP/MathExecutor.php b/src/NXP/MathExecutor.php
index d23ba80..434246a 100644
--- a/src/NXP/MathExecutor.php
+++ b/src/NXP/MathExecutor.php
@@ -432,7 +432,8 @@ class MathExecutor
public function setVar(string $variable, $value) : self
{
if (!is_scalar($value)) {
- throw new MathExecutorException("Variable ({$variable}) value must be a scalar type ({gettype($value)})");
+ $type = gettype($value);
+ throw new MathExecutorException("Variable ({$variable}) type ({$type}) is not scalar");
}
$this->variables[$variable] = $value;