diff --git a/library/Icingadb/Command/Transport/CommandTransportException.php b/library/Icingadb/Command/Transport/CommandTransportException.php index 2ca89d9d..5c5e6179 100644 --- a/library/Icingadb/Command/Transport/CommandTransportException.php +++ b/library/Icingadb/Command/Transport/CommandTransportException.php @@ -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; + } }