diff options
author | Bruce Wells <brucekwells@gmail.com> | 2020-07-27 19:25:59 +0300 |
---|---|---|
committer | Bruce Wells <brucekwells@gmail.com> | 2020-09-16 04:14:44 +0300 |
commit | 8a2cae984f77ed55195bed071b12a165fa532561 (patch) | |
tree | f91391945ab9eea944a785209d6db1698e1529cc /src/NXP | |
parent | 92d1a4524b5b2c7b4fc778e99815a49d227fc5ef (diff) |
Better setVar error message (#70)
Additional unit tests
Readme update
Diffstat (limited to 'src/NXP')
-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; |