Skip to content

Commit

Permalink
add missing exception message
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidBadura committed Jan 25, 2024
1 parent f7e46d5 commit 9b5d0a9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Metadata/AggregateRoot/ClassIsNotAnAggregate.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@

use Patchlevel\EventSourcing\Metadata\MetadataException;

use function sprintf;

final class ClassIsNotAnAggregate extends MetadataException
{
/** @param class-string $class */
public function __construct(string $class)
{
parent::__construct(sprintf('class %s is not an aggregate root', $class));
}
}
7 changes: 7 additions & 0 deletions src/Metadata/Event/ClassIsNotAnEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@

use Patchlevel\EventSourcing\Metadata\MetadataException;

use function sprintf;

final class ClassIsNotAnEvent extends MetadataException
{
/** @param class-string $class */
public function __construct(string $class)
{
parent::__construct(sprintf('class %s is not an event', $class));
}
}

0 comments on commit 9b5d0a9

Please sign in to comment.