@@ 13-28 (lines=16) @@ | ||
10 | * |
|
11 | * @package Mikemirten\Component\JsonApi\Exception |
|
12 | */ |
|
13 | class RelationshipNotFoundException extends JsonApiException |
|
14 | { |
|
15 | /** |
|
16 | * RelationshipNotFoundException constructor. |
|
17 | * |
|
18 | * @param RelationshipsAwareInterface $container |
|
19 | * @param string $name |
|
20 | * @param \Exception | null $previous |
|
21 | */ |
|
22 | public function __construct(RelationshipsAwareInterface $container, string $name, \Exception $previous = null) |
|
23 | { |
|
24 | $message = sprintf('Relationship "%s" not found inside of [%s].', $name, $container); |
|
25 | ||
26 | parent::__construct($message, 0, $previous); |
|
27 | } |
|
28 | } |
@@ 13-28 (lines=16) @@ | ||
10 | * |
|
11 | * @package Mikemirten\Component\JsonApi\Exception |
|
12 | */ |
|
13 | class RelationshipOverrideException extends JsonApiException |
|
14 | { |
|
15 | /** |
|
16 | * RelationshipOverrideException constructor. |
|
17 | * |
|
18 | * @param RelationshipsAwareInterface $container |
|
19 | * @param string $name |
|
20 | * @param \Exception | null $previous |
|
21 | */ |
|
22 | public function __construct(RelationshipsAwareInterface $container, string $name, \Exception $previous = null) |
|
23 | { |
|
24 | $message = sprintf('Relationship "%s" already exists inside of [%s]. To set new one, the old one must be removed.', $name, $container); |
|
25 | ||
26 | parent::__construct($message, 0, $previous); |
|
27 | } |
|
28 | } |