Files
librenms-librenms/LibreNMS/Exceptions/HostnameExistsException.php
Tony Murray 1bfd411995 New device:add code (#13842)
* New device:add code
pre-requisite for updating other code paths
includes option to set display name
separate validation code from device creation

* remove duplicate community and v3 creds

* style fixes

* some lint fixes

* fix phpstan

* Exception cleanup
improved messages and translations

* port association mode to enum
well, pseudo enum

* defaults and cleanups

* fixed/improved validation messages

* fix tests

* fix stupid ide refactor mistake

* lint fixes
2022-03-12 16:14:32 -06:00

27 lines
474 B
PHP

<?php
namespace LibreNMS\Exceptions;
class HostnameExistsException extends HostExistsException
{
/**
* @var string
*/
public $hostname;
/**
* @var string
*/
public $existing;
public function __construct(string $hostname)
{
$this->hostname = $hostname;
$message = trans('exceptions.host_exists.hostname_exists', [
'hostname' => $hostname,
]);
parent::__construct($message);
}
}