CommandUsage: do not throw ProgrammingError

This commit is contained in:
Thomas Gelf 2018-10-30 16:41:19 +01:00
parent e899a6723d
commit f43c74dc8e
1 changed files with 3 additions and 5 deletions

View File

@ -2,10 +2,10 @@
namespace Icinga\Module\Director\Resolver;
use Icinga\Exception\ProgrammingError;
use Icinga\Module\Director\Objects\IcingaCommand;
use dipl\Html\Link;
use dipl\Translation\TranslationHelper;
use Icinga\Module\Director\Objects\IcingaCommand;
use InvalidArgumentException;
class CommandUsage
{
@ -20,12 +20,11 @@ class CommandUsage
/**
* CommandUsageTable constructor.
* @param IcingaCommand $command
* @throws ProgrammingError
*/
public function __construct(IcingaCommand $command)
{
if ($command->isTemplate()) {
throw new ProgrammingError(
throw new InvalidArgumentException(
'CommandUsageTable expects object or external_object, got a template'
);
}
@ -36,7 +35,6 @@ class CommandUsage
/**
* @return array
* @throws ProgrammingError
*/
public function getLinks()
{