. * * @link https://www.librenms.org * * @copyright 2022 Tony Murray * @author Tony Murray */ namespace LibreNMS\Exceptions; class AlertTransportDeliveryException extends \Exception { /** @var array */ protected $params = []; /** @var string */ protected $template = ''; /** @var string */ protected $response = ''; /** * @param array $data * @param int $code * @param string $response * @param string $message * @param array $params */ public function __construct($data, $code = 0, $response = '', $message = '', $params = []) { $this->params = $params; $this->template = $message; $this->response = $response; $name = $data['transport_name'] ?? ''; $message = "Transport delivery failed with $code for $name: $response"; parent::__construct($message, $code); } }