mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-02-03 20:40:15 -05:00
CommandTransportException: Allow to attach the failed command
This commit is contained in:
parent
17b4d96744
commit
27f0d0f680
1 changed files with 29 additions and 0 deletions
|
|
@ -11,4 +11,33 @@ use Icinga\Exception\IcingaException;
|
|||
*/
|
||||
class CommandTransportException extends IcingaException
|
||||
{
|
||||
/** @var mixed The command that was not sent */
|
||||
private mixed $command = null;
|
||||
|
||||
/**
|
||||
* Set the command that was not sent
|
||||
*
|
||||
* This will be passed to the next transport in the chain.
|
||||
* Make sure the transport accepts this type in {@see CommandTransportInterface::send()}.
|
||||
*
|
||||
* @param mixed $command
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setCommand(mixed $command): static
|
||||
{
|
||||
$this->command = $command;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the command that was not sent
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getCommand(): mixed
|
||||
{
|
||||
return $this->command;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue