diff options
author | Bruce Wells <brucekwells@gmail.com> | 2020-07-27 19:25:59 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-27 19:25:59 +0300 |
commit | 44d72cc252974ac36cc138591aac785022760a50 (patch) | |
tree | f91391945ab9eea944a785209d6db1698e1529cc /src | |
parent | b38893d672f479314e8b9f254457b8b9755c781f (diff) |
Better setVar error message (#70)V2.1.1
Additional unit tests
Readme update
Diffstat (limited to 'src')
-rw-r--r-- | src/NXP/MathExecutor.php | 3 |
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; |