Skip to content

Commit

Permalink
TASK: Improve Exceptionhandling in BackendServiceController
Browse files Browse the repository at this point in the history
  • Loading branch information
mhsdesign committed Jan 12, 2024
1 parent b6f456d commit 29a73a1
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions Classes/Controller/BackendServiceController.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,16 @@ public function publishAction(array $nodeContextPaths, string $targetWorkspaceNa
NodeIdsToPublishOrDiscard::create(...$nodeIdentifiersToPublish)
)
)->block();
} catch (\DomainException $e) {
throw new \DomainException(
'Node could not be published, probably because of a missing or unpublished parentNode. Please check that the parentNode has been published and exists in the current dimension.',
1682762156,
} catch (NodeAggregateCurrentlyDoesNotExist $e) {
throw new \RuntimeException(
'Node could not be published, probably because of a missing parentNode. Please check that the parentNode has been published.',
1705053430,
$e
);
} catch (NodeAggregateDoesCurrentlyNotCoverDimensionSpacePoint $e) {
throw new \RuntimeException(
'Node could not be published, probably because the parentNode does not exist in the current dimension. Please check that the parentNode has been published.',
1705053432,
$e
);
}
Expand Down

0 comments on commit 29a73a1

Please sign in to comment.