Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TASK: Base exception on \RuntimeException instead of \DomainException for ESCR core #5399

Draft
wants to merge 1 commit into
base: 9.0
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* The exception to be thrown if an invalid content dimension id was attempted to be initialized
* @api
*/
class ContentDimensionIdIsInvalid extends \DomainException
class ContentDimensionIdIsInvalid extends \RuntimeException
{
public static function becauseItMustNotBeEmpty(): self
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* The exception to be thrown if an invalid content dimension value was attempted to be initialized
* @api
*/
class ContentDimensionValueIsInvalid extends \DomainException
class ContentDimensionValueIsInvalid extends \RuntimeException
{
public static function becauseItMustNotBeEmpty(): self
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* The exception to be thrown if an invalid content dimension value specialization depth was tried to be initialized
* @api
*/
class ContentDimensionValueSpecializationDepthIsInvalid extends \DomainException
class ContentDimensionValueSpecializationDepthIsInvalid extends \RuntimeException
{
public static function becauseItMustBeNonNegative(int $attemptedValue): self
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* The exception to be thrown if content dimension values are tried to be initialized empty
* @api
*/
class ContentDimensionValuesAreInvalid extends \DomainException
class ContentDimensionValuesAreInvalid extends \RuntimeException
{
public static function becauseTheyMustNotBeEmpty(): self
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* The exception to be thrown if an invalid generalization of a content dimension value was tried to be initialized
* @api
*/
class GeneralizationIsInvalid extends \DomainException
class GeneralizationIsInvalid extends \RuntimeException
{
public static function becauseComparedValueIsNoSpecialization(
ContentDimensionValue $value,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* e.g. if they compose of different dimension combinations
* @api
*/
class ContentSubgraphVariationWeightsAreIncomparable extends \DomainException
class ContentSubgraphVariationWeightsAreIncomparable extends \RuntimeException
{
public static function butWereAttemptedTo(
ContentSubgraphVariationWeight $first,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* as a specialization of another one but isn't
* @api
*/
class DimensionSpacePointIsNoSpecialization extends \DomainException
class DimensionSpacePointIsNoSpecialization extends \RuntimeException
{
public static function butWasSupposedToBe(DimensionSpacePoint $target, DimensionSpacePoint $source): self
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* A dimension space point was not found
* @api
*/
class DimensionSpacePointNotFound extends \DomainException
class DimensionSpacePointNotFound extends \RuntimeException
{
public static function becauseItIsNotWithinTheAllowedDimensionSubspace(
DimensionSpacePoint $dimensionSpacePoint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
*
* @api
*/
final class DimensionSpacePointAlreadyExists extends \DomainException
final class DimensionSpacePointAlreadyExists extends \RuntimeException
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
/**
* @api
*/
final class NodeAggregateIsAlreadyDisabled extends \DomainException
final class NodeAggregateIsAlreadyDisabled extends \RuntimeException
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
/**
* @api
*/
final class NodeAggregateIsAlreadyEnabled extends \DomainException
final class NodeAggregateIsAlreadyEnabled extends \RuntimeException
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
*
* @api
*/
final class DimensionSpacePointIsAlreadyOccupied extends \DomainException
final class DimensionSpacePointIsAlreadyOccupied extends \RuntimeException
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
/**
* @api
*/
final class SubtreeIsAlreadyTagged extends \DomainException
final class SubtreeIsAlreadyTagged extends \RuntimeException
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
/**
* @api
*/
final class SubtreeIsNotTagged extends \DomainException
final class SubtreeIsNotTagged extends \RuntimeException
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
* @api
*/
final class BaseWorkspaceDoesNotExist extends \DomainException
final class BaseWorkspaceDoesNotExist extends \RuntimeException
{
public static function butWasSupposedTo(WorkspaceName $name): self
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
/**
* @api
*/
final class WorkspaceAlreadyExists extends \DomainException
final class WorkspaceAlreadyExists extends \RuntimeException
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
/**
* @api
*/
class CircularRelationBetweenWorkspacesException extends \DomainException
class CircularRelationBetweenWorkspacesException extends \RuntimeException
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ private function __construct(
if ($this->isArrayOf()) {
$arrayOfType = self::tryFromString($this->getArrayOf());
if (!$arrayOfType || $arrayOfType->isArray()) {
throw new \DomainException(sprintf(
throw new \InvalidArgumentException(sprintf(
'Array declaration "%s" has invalid subType. Expected either class string or int',
$this->value
));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*
* @api because this might have to be handled in the application layer
*/
final class AbsoluteNodePathIsInvalid extends \DomainException
final class AbsoluteNodePathIsInvalid extends \RuntimeException
{
public static function becauseItDoesNotMatchTheRequiredPattern(string $attemptedValue): self
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
*
* @api because exception is thrown during invariant checks on command execution
*/
final class ContentStreamAlreadyExists extends \DomainException
final class ContentStreamAlreadyExists extends \RuntimeException
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
*
* @api because exception is thrown during invariant checks on command execution
*/
final class ContentStreamDoesNotExistYet extends \DomainException
final class ContentStreamDoesNotExistYet extends \RuntimeException
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
*
* @api because exception is thrown during invariant checks on command execution
*/
final class ContentStreamIsClosed extends \DomainException
final class ContentStreamIsClosed extends \RuntimeException
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
*
* @api because exception is thrown during invariant checks on command execution
*/
final class ContentStreamIsNotClosed extends \DomainException
final class ContentStreamIsNotClosed extends \RuntimeException
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
*
* @api because exception is thrown during invariant checks on command execution
*/
final class DimensionSpacePointIsNotYetOccupied extends \DomainException
final class DimensionSpacePointIsNotYetOccupied extends \RuntimeException
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
*
* @api
*/
class InvalidNodeTypePostprocessorException extends \DomainException
class InvalidNodeTypePostprocessorException extends \RuntimeException
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
*
* @api because exception is thrown during invariant checks on command execution
*/
final class NodeAggregateCurrentlyDoesNotExist extends \DomainException
final class NodeAggregateCurrentlyDoesNotExist extends \RuntimeException
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
*
* @api because exception is thrown during invariant checks on command execution
*/
final class NodeAggregateCurrentlyExists extends \DomainException
final class NodeAggregateCurrentlyExists extends \RuntimeException
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*
* @api because exception is thrown during invariant checks on command execution
*/
final class NodeAggregateDoesCurrentlyNotCoverDimensionSpacePoint extends \DomainException
final class NodeAggregateDoesCurrentlyNotCoverDimensionSpacePoint extends \RuntimeException
{
public static function butWasSupposedTo(
NodeAggregateId $nodeAggregateId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*
* @api because exception is thrown during invariant checks on command execution
*/
final class NodeAggregateDoesCurrentlyNotCoverDimensionSpacePointSet extends \DomainException
final class NodeAggregateDoesCurrentlyNotCoverDimensionSpacePointSet extends \RuntimeException
{
public static function butWasSupposedTo(
NodeAggregateId $nodeAggregateId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*
* @api because exception is thrown during invariant checks on command execution
*/
final class NodeAggregateDoesCurrentlyNotOccupyDimensionSpacePoint extends \DomainException
final class NodeAggregateDoesCurrentlyNotOccupyDimensionSpacePoint extends \RuntimeException
{
public static function butWasSupposedTo(
NodeAggregateId $nodeAggregateId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
*
* @api because exception is thrown during invariant checks on command execution
*/
final class NodeAggregateIsAmbiguous extends \DomainException
final class NodeAggregateIsAmbiguous extends \RuntimeException
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
*
* @api because exception is thrown during invariant checks on command execution
*/
final class NodeAggregateIsDescendant extends \DomainException
final class NodeAggregateIsDescendant extends \RuntimeException
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*
* @api because exception is thrown during invariant checks on command execution
*/
final class NodeAggregateIsNoChild extends \DomainException
final class NodeAggregateIsNoChild extends \RuntimeException
{
public static function butWasExpectedToBeInDimensionSpacePoint(
NodeAggregateId $nodeAggregateId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*
* @api because exception is thrown during invariant checks on command execution
*/
final class NodeAggregateIsNoSibling extends \DomainException
final class NodeAggregateIsNoSibling extends \RuntimeException
{
public static function butWasExpectedToBeInDimensionSpacePoint(NodeAggregateId $nodeAggregateId, NodeAggregateId $referenceNodeAggregateId, DimensionSpacePoint $dimensionSpacePoint): self
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
*
* @api because exception is thrown during invariant checks on command execution
*/
final class NodeAggregateIsNotRoot extends \DomainException
final class NodeAggregateIsNotRoot extends \RuntimeException
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
*
* @api because exception is thrown during invariant checks on command execution
*/
final class NodeAggregateIsRoot extends \DomainException
final class NodeAggregateIsRoot extends \RuntimeException
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
*
* @api because exception is thrown during invariant checks on command execution
*/
final class NodeAggregateIsTethered extends \DomainException
final class NodeAggregateIsTethered extends \RuntimeException
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
*
* @api because exception is thrown during invariant checks on command execution
*/
final class NodeAggregateIsUntethered extends \DomainException
final class NodeAggregateIsUntethered extends \RuntimeException
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
*
* @api because exception is thrown during invariant checks on command execution
*/
final class NodeAggregatesTypeIsAmbiguous extends \DomainException
final class NodeAggregatesTypeIsAmbiguous extends \RuntimeException
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
*
* @api
*/
class NodeConfigurationException extends \DomainException
class NodeConfigurationException extends \RuntimeException
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
*
* @api
*/
class NodeConstraintException extends \DomainException
class NodeConstraintException extends \RuntimeException
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
*
* @api because exception is thrown during invariant checks on command execution
*/
final class NodeNameIsAlreadyCovered extends \DomainException
final class NodeNameIsAlreadyCovered extends \RuntimeException
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*
* @api because exception is thrown during invariant checks on command execution
*/
final class NodeTypeIsAbstract extends \DomainException
final class NodeTypeIsAbstract extends \RuntimeException
{
public static function butWasNotSupposedToBe(NodeTypeName $nodeTypeName): self
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
*
* @api
*/
class NodeTypeIsFinalException extends \DomainException
class NodeTypeIsFinalException extends \RuntimeException
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
*
* @api because exception is thrown during invariant checks on command execution
*/
final class NodeTypeIsNotOfTypeRoot extends \DomainException
final class NodeTypeIsNotOfTypeRoot extends \RuntimeException
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
*
* @api because exception is thrown during invariant checks on command execution
*/
final class NodeTypeIsOfTypeRoot extends \DomainException
final class NodeTypeIsOfTypeRoot extends \RuntimeException
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*
* @api because exception is thrown during invariant checks on command execution
*/
final class PropertyCannotBeSet extends \DomainException
final class PropertyCannotBeSet extends \RuntimeException
{
public static function becauseTheValueDoesNotMatchTheConfiguredType(
PropertyName $propertyName,
Expand Down
Loading
Loading