HostController, related: tweak Exceptions

This commit is contained in:
Thomas Gelf 2018-08-06 13:50:28 +02:00
parent 505912135d
commit 8c30b9c5de
3 changed files with 12 additions and 44 deletions

View File

@ -49,8 +49,6 @@ class HostController extends ObjectController
/**
* @throws \Icinga\Exception\ConfigurationError
* @throws \Icinga\Exception\Http\HttpNotFoundException
* @throws \Icinga\Exception\IcingaException
* @throws \Icinga\Exception\ProgrammingError
*/
public function serviceAction()
{
@ -68,8 +66,6 @@ class HostController extends ObjectController
/**
* @throws \Icinga\Exception\ConfigurationError
* @throws \Icinga\Exception\Http\HttpNotFoundException
* @throws \Icinga\Exception\IcingaException
* @throws \Icinga\Exception\ProgrammingError
*/
public function servicesetAction()
{
@ -86,8 +82,6 @@ class HostController extends ObjectController
/**
* @throws \Icinga\Exception\Http\HttpNotFoundException
* @throws \Icinga\Exception\IcingaException
* @throws \Icinga\Exception\ProgrammingError
*/
protected function addServicesHeader()
{
@ -109,9 +103,7 @@ class HostController extends ObjectController
}
/**
* @throws \Icinga\Exception\ConfigurationError
* @throws \Icinga\Exception\IcingaException
* @throws \Icinga\Exception\ProgrammingError
* @throws \Icinga\Exception\NotFoundError
*/
public function findserviceAction()
{
@ -123,7 +115,9 @@ class HostController extends ObjectController
}
/**
* @throws \Icinga\Exception\IcingaException
* @throws \Icinga\Exception\ConfigurationError
* @throws \Icinga\Exception\Http\HttpNotFoundException
* @throws \Icinga\Exception\NotFoundError
*/
public function invalidserviceAction()
{
@ -139,8 +133,8 @@ class HostController extends ObjectController
/**
* @throws \Icinga\Exception\ConfigurationError
* @throws \Icinga\Exception\IcingaException
* @throws \Icinga\Exception\ProgrammingError
* @throws \Icinga\Exception\Http\HttpNotFoundException
* @throws \Icinga\Exception\NotFoundError
*/
public function servicesAction()
{
@ -210,7 +204,6 @@ class HostController extends ObjectController
* @param IcingaHost $host
* @param IcingaHost|null $affectedHost
* @throws \Icinga\Exception\ConfigurationError
* @throws \Icinga\Exception\IcingaException
*/
protected function addHostServiceSetTables(IcingaHost $host, IcingaHost $affectedHost = null)
{
@ -248,9 +241,8 @@ class HostController extends ObjectController
/**
* @throws \Icinga\Exception\ConfigurationError
* @throws \Icinga\Exception\IcingaException
* @throws \Icinga\Exception\Http\HttpNotFoundException
* @throws \Icinga\Exception\NotFoundError
* @throws \Icinga\Exception\ProgrammingError
*/
public function appliedserviceAction()
{
@ -287,9 +279,8 @@ class HostController extends ObjectController
/**
* @throws \Icinga\Exception\ConfigurationError
* @throws \Icinga\Exception\IcingaException
* @throws \Icinga\Exception\Http\HttpNotFoundException
* @throws \Icinga\Exception\NotFoundError
* @throws \Icinga\Exception\ProgrammingError
*/
public function inheritedserviceAction()
{
@ -329,7 +320,6 @@ class HostController extends ObjectController
/**
* @throws \Icinga\Exception\ConfigurationError
* @throws \Icinga\Exception\IcingaException
* @throws \Icinga\Exception\NotFoundError
* @throws \Icinga\Exception\ProgrammingError
*/
@ -360,9 +350,7 @@ class HostController extends ObjectController
/**
* @throws \Icinga\Exception\ConfigurationError
* @throws \Icinga\Exception\Http\HttpNotFoundException
* @throws \Icinga\Exception\IcingaException
* @throws \Icinga\Exception\NotFoundError
* @throws \Icinga\Exception\ProgrammingError
*/
public function servicesetserviceAction()
{
@ -404,8 +392,6 @@ class HostController extends ObjectController
/**
* @throws \Icinga\Exception\Http\HttpNotFoundException
* @throws \Icinga\Exception\IcingaException
* @throws \Icinga\Exception\ProgrammingError
*/
protected function commonForServices()
{
@ -421,7 +407,6 @@ class HostController extends ObjectController
/**
* @throws \Icinga\Exception\Http\HttpNotFoundException
* @throws \Icinga\Exception\IcingaException
* @throws \Icinga\Exception\NotFoundError
* @throws \Icinga\Exception\ProgrammingError
*/
@ -464,10 +449,6 @@ class HostController extends ObjectController
}
}
/**
* @throws \Icinga\Exception\IcingaException
* @throws \Icinga\Exception\ProgrammingError
*/
protected function addOptionalInspectLink()
{
if (! $this->hasPermission('director/inspect')) {

View File

@ -35,7 +35,6 @@ class SelfService
/**
* @param ControlsAndContent $controller
* @throws \Icinga\Exception\IcingaException
* @throws \Icinga\Exception\ProgrammingError
*/
public function renderTo(ControlsAndContent $controller)
@ -54,7 +53,6 @@ class SelfService
/**
* @param ControlsAndContent $c
* @throws \Icinga\Exception\IcingaException
*/
protected function showRegisteredAgentInstructions(ControlsAndContent $c)
{
@ -76,7 +74,6 @@ class SelfService
/**
* @param ControlsAndContent $cc
* @throws \Icinga\Exception\IcingaException
* @throws \Icinga\Exception\ProgrammingError
*/
protected function showSelfServiceTemplateInstructions(ControlsAndContent $cc)
@ -147,7 +144,6 @@ class SelfService
/**
* @param ControlsAndContent $cc
* @throws \Icinga\Exception\IcingaException
* @throws \Icinga\Exception\ProgrammingError
*/
protected function showNewAgentInstructions(ControlsAndContent $cc)
@ -181,8 +177,6 @@ class SelfService
/**
* @param ControlsAndContent $cc
* @throws \Icinga\Exception\IcingaException
* @throws \Icinga\Exception\ProgrammingError
*/
protected function showLegacyAgentInstructions(ControlsAndContent $cc)
{

View File

@ -32,8 +32,7 @@ class HostServiceRedirector
/**
* @param $serviceName
* @return Url
* @throws \Icinga\Exception\IcingaException
* @throws \Icinga\Exception\ProgrammingError
* @throws \Icinga\Exception\NotFoundError
*/
public function getRedirectionUrl($serviceName)
{
@ -57,7 +56,7 @@ class HostServiceRedirector
/**
* @return IcingaHost[]
* @throws \Icinga\Exception\ProgrammingError
* @throws \Icinga\Exception\NotFoundError
*/
protected function getParents()
{
@ -73,8 +72,6 @@ class HostServiceRedirector
/**
* @param $serviceName
* @return Url|null
* @throws \Icinga\Exception\IcingaException
* @throws \Icinga\Exception\ProgrammingError
*/
protected function getSingleServiceUrl($serviceName)
{
@ -94,8 +91,7 @@ class HostServiceRedirector
/**
* @param $serviceName
* @return Url|null
* @throws \Icinga\Exception\IcingaException
* @throws \Icinga\Exception\ProgrammingError
* @throws \Icinga\Exception\NotFoundError
*/
protected function getParentServiceUrl($serviceName)
{
@ -118,8 +114,7 @@ class HostServiceRedirector
/**
* @param $serviceName
* @return Url|null
* @throws \Icinga\Exception\IcingaException
* @throws \Icinga\Exception\ProgrammingError
* @throws \Icinga\Exception\NotFoundError
*/
protected function getServiceSetServiceUrl($serviceName)
{
@ -163,7 +158,6 @@ class HostServiceRedirector
/**
* @param $serviceName
* @return Url|null
* @throws \Icinga\Exception\ProgrammingError
*/
protected function getAppliedServiceUrl($serviceName)
{
@ -183,7 +177,6 @@ class HostServiceRedirector
/**
* @param $serviceName
* @return Url|null
* @throws \Icinga\Exception\ProgrammingError
*/
protected function getAppliedServiceSetUrl($serviceName)
{