mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-30 01:04:09 +02:00
monitoring: Rename TransportException to CommandTransportException
This commit is contained in:
parent
e15cd65ed4
commit
4536eacd66
@ -7,7 +7,7 @@ use Exception;
|
|||||||
use RuntimeException;
|
use RuntimeException;
|
||||||
use Icinga\Application\Logger;
|
use Icinga\Application\Logger;
|
||||||
use Icinga\Exception\ConfigurationError;
|
use Icinga\Exception\ConfigurationError;
|
||||||
use Icinga\Module\Monitoring\Command\Exception\TransportException;
|
use Icinga\Module\Monitoring\Command\Exception\CommandTransportException;
|
||||||
use Icinga\Module\Monitoring\Command\IcingaCommand;
|
use Icinga\Module\Monitoring\Command\IcingaCommand;
|
||||||
use Icinga\Module\Monitoring\Command\Renderer\IcingaCommandFileCommandRenderer;
|
use Icinga\Module\Monitoring\Command\Renderer\IcingaCommandFileCommandRenderer;
|
||||||
use Icinga\Util\File;
|
use Icinga\Util\File;
|
||||||
@ -104,7 +104,7 @@ class LocalCommandFile implements CommandTransportInterface
|
|||||||
* @param int|null $now
|
* @param int|null $now
|
||||||
*
|
*
|
||||||
* @throws ConfigurationError
|
* @throws ConfigurationError
|
||||||
* @throws TransportException
|
* @throws CommandTransportException
|
||||||
*/
|
*/
|
||||||
public function send(IcingaCommand $command, $now = null)
|
public function send(IcingaCommand $command, $now = null)
|
||||||
{
|
{
|
||||||
@ -129,7 +129,7 @@ class LocalCommandFile implements CommandTransportInterface
|
|||||||
// Assume RuntimeException thrown by SplFileObject in the format: __METHOD__ . "({$filename}): Message"
|
// Assume RuntimeException thrown by SplFileObject in the format: __METHOD__ . "({$filename}): Message"
|
||||||
$message = substr($message, $pos + 1);
|
$message = substr($message, $pos + 1);
|
||||||
}
|
}
|
||||||
throw new TransportException(
|
throw new CommandTransportException(
|
||||||
'Can\'t send external Icinga command to the local command file "%s": %s',
|
'Can\'t send external Icinga command to the local command file "%s": %s',
|
||||||
$this->path,
|
$this->path,
|
||||||
$message
|
$message
|
||||||
|
@ -6,7 +6,7 @@ namespace Icinga\Module\Monitoring\Command\Transport;
|
|||||||
use Icinga\Application\Logger;
|
use Icinga\Application\Logger;
|
||||||
use Icinga\Data\ResourceFactory;
|
use Icinga\Data\ResourceFactory;
|
||||||
use Icinga\Exception\ConfigurationError;
|
use Icinga\Exception\ConfigurationError;
|
||||||
use Icinga\Module\Monitoring\Command\Exception\TransportException;
|
use Icinga\Module\Monitoring\Command\Exception\CommandTransportException;
|
||||||
use Icinga\Module\Monitoring\Command\IcingaCommand;
|
use Icinga\Module\Monitoring\Command\IcingaCommand;
|
||||||
use Icinga\Module\Monitoring\Command\Renderer\IcingaCommandFileCommandRenderer;
|
use Icinga\Module\Monitoring\Command\Renderer\IcingaCommandFileCommandRenderer;
|
||||||
|
|
||||||
@ -224,7 +224,7 @@ class RemoteCommandFile implements CommandTransportInterface
|
|||||||
* @param int|null $now
|
* @param int|null $now
|
||||||
*
|
*
|
||||||
* @throws ConfigurationError
|
* @throws ConfigurationError
|
||||||
* @throws TransportException
|
* @throws CommandTransportException
|
||||||
*/
|
*/
|
||||||
public function send(IcingaCommand $command, $now = null)
|
public function send(IcingaCommand $command, $now = null)
|
||||||
{
|
{
|
||||||
@ -260,7 +260,7 @@ class RemoteCommandFile implements CommandTransportInterface
|
|||||||
);
|
);
|
||||||
exec($ssh, $output, $status);
|
exec($ssh, $output, $status);
|
||||||
if ($status !== 0) {
|
if ($status !== 0) {
|
||||||
throw new TransportException(
|
throw new CommandTransportException(
|
||||||
'Can\'t send external Icinga command: %s',
|
'Can\'t send external Icinga command: %s',
|
||||||
implode(' ', $output)
|
implode(' ', $output)
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user