TASK: Base exception on \RuntimeException
instead of \DomainException
for ESCR core
#5399
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Initially i adapted the style to use
DomainExceptions
too which is part of this RFC: https://discuss.neos.io/t/rfc-updated-default-code-style/5836#exceptions-5 but then @bwaidelich pointed out that this is not correct (todo why?) and that we should not base exceptions on that.There are already 50 cases where use
throw \RuntimeException
andWorkspaceIsNotEmptyException
,PartialWorkspaceRebaseFailed
,WorkspaceRebaseFailed
As i was tempted to change it for the
WorkspaceDoesNotExistException
which will be thrown very likely via #5334 (comment) i might as well do it once and for all for all cases before we have to do it later (its fairly simple string replace)We just have to agree on a common pattern here.
Disclaimer: Im not really that invested in whatever we agree on - as long as everybody is happy and its consistent. Maybe we agree that is currently okay as well?
Todo:
class AccessDenied extends \Exception
instead of\RuntimeException
?Upgrade instructions
Review instructions
Checklist
FEATURE|TASK|BUGFIX
!!!
and have upgrade-instructions