Skip to content

Commit

Permalink
dont wrap CXmlException into CXmlProcessException
Browse files Browse the repository at this point in the history
  • Loading branch information
mathielen committed Dec 8, 2023
1 parent 6c21d10 commit 3b66de8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/CXml/Processor/Processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ private function processMessage(Message $message, Context $context): void

try {
$this->getHandlerForPayload($payload)->handle($payload, $context);
} catch (CXmlException $e) {
throw $e;
} catch (\Throwable $e) {
throw new CXmlProcessException($e);
}
Expand All @@ -183,6 +185,8 @@ private function processResponse(Response $response, Context $context): void

try {
$this->getHandlerForPayload($payload)->handle($payload, $context);
} catch (CXmlException $e) {
throw $e;
} catch (\Throwable $e) {
throw new CXmlProcessException($e);
}
Expand All @@ -201,6 +205,8 @@ private function processRequest(Request $request, Context $context): CXml

try {
$this->headerProcessor->process($header, $context);
} catch (CXmlException $e) {
throw $e;
} catch (\Throwable $e) {
throw new CXmlProcessException($e);
}
Expand Down

0 comments on commit 3b66de8

Please sign in to comment.