diff options
author | Alexander Kiryukhin <alexander@kiryukhin.su> | 2018-09-06 20:37:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-06 20:37:48 +0300 |
commit | a969571772a9761f67672b229741f209f5391560 (patch) | |
tree | d7080eefe3251409d3e4c7dceddf7c3f3738913d /src/NXP/Classes/TokenFactory.php | |
parent | b04cf54aa3e4d31bcea43011b371c75d168ac7f6 (diff) | |
parent | 7db873a63655258bd30ff2d83f186da48f2c50e1 (diff) |
Merge pull request #25 from phpfui/Exception_messages
Exception Messages
Diffstat (limited to 'src/NXP/Classes/TokenFactory.php')
-rw-r--r-- | src/NXP/Classes/TokenFactory.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/NXP/Classes/TokenFactory.php b/src/NXP/Classes/TokenFactory.php index 19ba1cf..07b9ea8 100644 --- a/src/NXP/Classes/TokenFactory.php +++ b/src/NXP/Classes/TokenFactory.php @@ -61,7 +61,7 @@ class TokenFactory $class = new \ReflectionClass($operatorClass); if (!in_array('NXP\Classes\Token\InterfaceToken', $class->getInterfaceNames())) { - throw new UnknownOperatorException; + throw new UnknownOperatorException($operatorClass); } $this->operators[] = $operatorClass; @@ -140,10 +140,10 @@ class TokenFactory if (isset($this->functions[$token])) { return new TokenFunction($this->functions[$token]); } else { - throw new UnknownFunctionException(); + throw new UnknownFunctionException($token); } } - throw new UnknownTokenException(); + throw new UnknownTokenException($token); } } |