Skip to content

Commit 1c1ed9a

Browse files
authored
chore: more specific exception (#24)
* More specific exception
1 parent 14a9f1a commit 1c1ed9a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/Exception/InvalidToolImplementation.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44

55
namespace PhpLlm\LlmChain\Exception;
66

7+
use PhpLlm\LlmChain\ToolBox\AsTool;
8+
79
final class InvalidToolImplementation extends \InvalidArgumentException
810
{
911
public static function missingAttribute(string $className): self
1012
{
11-
return new self(sprintf('The class "%s" is not a tool, please add AsTool attribute.', $className));
13+
return new self(sprintf('The class "%s" is not a tool, please add %s attribute.', $className, AsTool::class));
1214
}
1315
}

src/Exception/MessageBagNotFound.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
final class MessageBagNotFound extends \DomainException
88
{
9-
public static function notFound(string $id): self
9+
public static function withId(string $id): self
1010
{
1111
return new self(sprintf('MessageBag with id "%s" not found', $id));
1212
}

0 commit comments

Comments
 (0)