Skip to content

Commit 32157c2

Browse files
committed
Improve exception message formatting
- Add period at end of Handoff exception message - Add quotes around duplicate names in configuration validation message
1 parent 4c94101 commit 32157c2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/agent/src/MultiAgent/Handoff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function __construct(
2929
private array $when,
3030
) {
3131
if ([] === $when) {
32-
throw new InvalidArgumentException('Handoff must have at least one "when" condition');
32+
throw new InvalidArgumentException('Handoff must have at least one "when" condition.');
3333
}
3434
}
3535

src/ai-bundle/config/options.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@
732732
$multiAgentNames = array_keys($v['multi_agent'] ?? []);
733733
$duplicates = array_intersect($agentNames, $multiAgentNames);
734734

735-
throw new \InvalidArgumentException(\sprintf('Agent names and multi-agent names must be unique. Duplicate name(s) found: %s', implode(', ', $duplicates)));
735+
throw new \InvalidArgumentException(\sprintf('Agent names and multi-agent names must be unique. Duplicate name(s) found: "%s"', implode(', ', $duplicates)));
736736
})
737737
->end()
738738
->validate()

0 commit comments

Comments
 (0)