-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make error of inline config parsing more informative
- Loading branch information
Showing
4 changed files
with
61 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Aeliot\TodoRegistrar\Exception; | ||
|
||
use Aeliot\TodoRegistrar\Dto\Comment\CommentPart; | ||
|
||
final class CommentRegistrationException extends \RuntimeException | ||
{ | ||
public function __construct( | ||
private CommentPart $commentPart, | ||
private \PhpToken $token, | ||
\Throwable $previous, | ||
) { | ||
parent::__construct(sprintf('Cannot register %s-comment', $this->commentPart->getTag()), 0, $previous); | ||
} | ||
|
||
public function getCommentPart(): CommentPart | ||
{ | ||
return $this->commentPart; | ||
} | ||
|
||
public function getToken(): \PhpToken | ||
{ | ||
return $this->token; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters