diff --git a/src/Symfony/Component/Console/Command/Command.php b/src/Symfony/Component/Console/Command/Command.php index f4f5401c5a..eca9d49835 100644 --- a/src/Symfony/Component/Console/Command/Command.php +++ b/src/Symfony/Component/Console/Command/Command.php @@ -65,7 +65,7 @@ class Command $this->configure(); if (!$this->name) { - throw new \LogicException('The command name cannot be empty.'); + throw new \LogicException(sprintf('The command defined in "%s" cannot have an empty name.', get_class($this))); } } diff --git a/src/Symfony/Component/Console/Tests/Command/CommandTest.php b/src/Symfony/Component/Console/Tests/Command/CommandTest.php index 6505f0da80..0425e17ee8 100644 --- a/src/Symfony/Component/Console/Tests/Command/CommandTest.php +++ b/src/Symfony/Component/Console/Tests/Command/CommandTest.php @@ -41,7 +41,7 @@ class CommandTest extends \PHPUnit_Framework_TestCase /** * @expectedException \LogicException - * @expectedExceptionMessage The command name cannot be empty. + * @expectedExceptionMessage The command defined in "Symfony\Component\Console\Command\Command" cannot have an empty name. */ public function testCommandNameCannotBeEmpty() {