From 753d42d1594cb22974717396a27310abf97f77f1 Mon Sep 17 00:00:00 2001 From: Netkas Date: Fri, 30 Dec 2022 03:06:27 -0500 Subject: [PATCH] Added Exception classes for RTEX --- src/RTEX/Abstracts/RuntimeExceptionCode.php | 14 ++++++-------- src/RTEX/Exceptions/EvaluationException.php | 19 +++++++++++++++++++ src/RTEX/Exceptions/InstructionException.php | 18 ++++++++++++++++++ src/RTEX/Exceptions/Runtime/Exception.php | 18 ++++++++++++++++++ .../Exceptions/Runtime/ImportException.php | 18 ++++++++++++++++++ src/RTEX/Exceptions/Runtime/KeyException.php | 18 ++++++++++++++++++ src/RTEX/Exceptions/Runtime/NameException.php | 18 ++++++++++++++++++ src/RTEX/Exceptions/Runtime/TypeException.php | 18 ++++++++++++++++++ .../Runtime/UndefinedMethodException.php | 18 ++++++++++++++++++ .../Runtime/ZeroDivisionException.php | 18 ++++++++++++++++++ 10 files changed, 169 insertions(+), 8 deletions(-) create mode 100644 src/RTEX/Exceptions/EvaluationException.php create mode 100644 src/RTEX/Exceptions/InstructionException.php create mode 100644 src/RTEX/Exceptions/Runtime/Exception.php create mode 100644 src/RTEX/Exceptions/Runtime/ImportException.php create mode 100644 src/RTEX/Exceptions/Runtime/KeyException.php create mode 100644 src/RTEX/Exceptions/Runtime/NameException.php create mode 100644 src/RTEX/Exceptions/Runtime/TypeException.php create mode 100644 src/RTEX/Exceptions/Runtime/UndefinedMethodException.php create mode 100644 src/RTEX/Exceptions/Runtime/ZeroDivisionException.php diff --git a/src/RTEX/Abstracts/RuntimeExceptionCode.php b/src/RTEX/Abstracts/RuntimeExceptionCode.php index dcc34bb..0bd8910 100644 --- a/src/RTEX/Abstracts/RuntimeExceptionCode.php +++ b/src/RTEX/Abstracts/RuntimeExceptionCode.php @@ -5,12 +5,10 @@ abstract class RuntimeExceptionCode { const Exception = 0; - const AttributeException = -100; - const ImportException = -101; - const KeyException = -102; - const NameException = -103; - const TypeException = -104; - const ValueException = -105; - const ZeroDivisionException = -106; - + const ImportException = -100; + const KeyException = -101; + const NameException = -102; + const TypeException = -103; + const UndefinedMethodException = -104; + const ZeroDivisionException = -105; } \ No newline at end of file diff --git a/src/RTEX/Exceptions/EvaluationException.php b/src/RTEX/Exceptions/EvaluationException.php new file mode 100644 index 0000000..a969ffc --- /dev/null +++ b/src/RTEX/Exceptions/EvaluationException.php @@ -0,0 +1,19 @@ +