mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* 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
29 lines
562 B
PHP
29 lines
562 B
PHP
<?php
|
|
|
|
namespace LibreNMS\Exceptions;
|
|
|
|
class HostSysnameExistsException extends HostExistsException
|
|
{
|
|
/**
|
|
* @var string
|
|
*/
|
|
public $hostname;
|
|
/**
|
|
* @var string
|
|
*/
|
|
public $sysname;
|
|
|
|
public function __construct(string $hostname, string $sysname)
|
|
{
|
|
$this->hostname = $hostname;
|
|
$this->sysname = $sysname;
|
|
|
|
$message = trans('exceptions.host_exists.sysname_exists', [
|
|
'hostname' => $hostname,
|
|
'sysname' => $sysname,
|
|
]);
|
|
|
|
parent::__construct($message);
|
|
}
|
|
}
|