From f0d4562b9ef3bbc64cb8353f0597e639420ede6b Mon Sep 17 00:00:00 2001 From: Bruce Wells Date: Tue, 30 Oct 2018 16:16:01 -0400 Subject: Division By Zero Exception support Updated the documentation. Unit tests for strings. DivisionByZeroException support. --- src/NXP/MathExecutor.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/NXP/MathExecutor.php') diff --git a/src/NXP/MathExecutor.php b/src/NXP/MathExecutor.php index d62d07a..fbf6ab1 100644 --- a/src/NXP/MathExecutor.php +++ b/src/NXP/MathExecutor.php @@ -218,6 +218,29 @@ class MathExecutor return $this->tokenFactory->getFunctions(); } + /** + * Set division by zero exception reporting + * + * @param bool $exception default true + * + * @return MathExecutor + */ + public function setDivisionByZeroException($exception = true) + { + $this->tokenFactory->setDivisionByZeroException($exception); + return $this; + } + + /** + * Get division by zero exception status + * + * @return bool + */ + public function getDivisionByZeroException() + { + return $this->tokenFactory->getDivisionByZeroException(); + } + /** * Execute expression * -- cgit v1.2.3