Added variable type to diagnostic message

This commit is contained in:
Bruce Wells 2018-09-05 18:17:05 -04:00
parent af2436d7cc
commit 7db873a636

View file

@ -92,7 +92,7 @@ class MathExecutor
public function setVar($variable, $value)
{
if (!is_numeric($value)) {
throw new \Exception("Variable ({$variable}) value must be a number ({$value})");
throw new \Exception("Variable ({$variable}) value must be a number ({$value}) type ({gettype($value)})");
}
$this->variables[$variable] = $value;