From af2436d7cc555216526052b901583c0e75dddb24 Mon Sep 17 00:00:00 2001 From: Bruce Wells Date: Mon, 27 Aug 2018 17:47:28 -0400 Subject: Exception Messages Basically the token that is causing the exception for better diagnostics. --- src/NXP/MathExecutor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/NXP/MathExecutor.php') diff --git a/src/NXP/MathExecutor.php b/src/NXP/MathExecutor.php index f348355..02b034f 100644 --- a/src/NXP/MathExecutor.php +++ b/src/NXP/MathExecutor.php @@ -92,7 +92,7 @@ class MathExecutor public function setVar($variable, $value) { if (!is_numeric($value)) { - throw new \Exception("Variable value must be a number"); + throw new \Exception("Variable ({$variable}) value must be a number ({$value})"); } $this->variables[$variable] = $value; -- cgit v1.2.3 From 7db873a63655258bd30ff2d83f186da48f2c50e1 Mon Sep 17 00:00:00 2001 From: Bruce Wells Date: Wed, 5 Sep 2018 18:17:05 -0400 Subject: Added variable type to diagnostic message --- src/NXP/MathExecutor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/NXP/MathExecutor.php') diff --git a/src/NXP/MathExecutor.php b/src/NXP/MathExecutor.php index 02b034f..80f0bde 100644 --- a/src/NXP/MathExecutor.php +++ b/src/NXP/MathExecutor.php @@ -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; -- cgit v1.2.3