From dd9eefb9adca1b5840bfb18e01582c5480ffd35e Mon Sep 17 00:00:00 2001 From: Aleksei Lebedev <1329824+LastDragon-ru@users.noreply.github.com> Date: Sat, 18 May 2024 10:07:53 +0400 Subject: [PATCH] A bit better exceptions hierarchy. --- .../Exceptions/InstructionFailed.php | 2 +- .../Exceptions/PreprocessingFailed.php | 17 +++++++++++++++++ ...eprocessFailed.php => PreprocessorError.php} | 2 +- .../src/Preprocessor/Preprocessor.php | 9 +++++---- 4 files changed, 24 insertions(+), 6 deletions(-) create mode 100644 packages/documentator/src/Preprocessor/Exceptions/PreprocessingFailed.php rename packages/documentator/src/Preprocessor/Exceptions/{PreprocessFailed.php => PreprocessorError.php} (74%) diff --git a/packages/documentator/src/Preprocessor/Exceptions/InstructionFailed.php b/packages/documentator/src/Preprocessor/Exceptions/InstructionFailed.php index e980f3c39..edddfb0e8 100644 --- a/packages/documentator/src/Preprocessor/Exceptions/InstructionFailed.php +++ b/packages/documentator/src/Preprocessor/Exceptions/InstructionFailed.php @@ -5,7 +5,7 @@ use LastDragon_ru\LaraASP\Documentator\Preprocessor\Context; use Throwable; -abstract class InstructionFailed extends PreprocessFailed { +abstract class InstructionFailed extends PreprocessorError { public function __construct( private readonly Context $context, string $message, diff --git a/packages/documentator/src/Preprocessor/Exceptions/PreprocessingFailed.php b/packages/documentator/src/Preprocessor/Exceptions/PreprocessingFailed.php new file mode 100644 index 000000000..13b6922c2 --- /dev/null +++ b/packages/documentator/src/Preprocessor/Exceptions/PreprocessingFailed.php @@ -0,0 +1,17 @@ +