From 6e9a4fb7765dda39656d1e95a743de1f79aab3b2 Mon Sep 17 00:00:00 2001 From: Guillaume Mazoyer Date: Sat, 18 Jul 2015 18:56:16 +0200 Subject: Change some errors messages. --- auth/ssh.php | 8 ++++---- auth/telnet.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'auth') diff --git a/auth/ssh.php b/auth/ssh.php index d8d56a1..e4d22a2 100644 --- a/auth/ssh.php +++ b/auth/ssh.php @@ -35,13 +35,13 @@ final class SSH extends Authentication { protected function check_config() { if ($this->config['auth'] == 'ssh-password') { if (!isset($this->config['user']) || !isset($this->config['pass'])) { - throw new Exception('User and password required for ssh-password.'); + throw new Exception('Router authentication configuration incomplete.'); } } if ($this->config['auth'] == 'ssh-key') { if (!isset($this->config['user']) || !isset($this->config['private_key'])) { - throw new Exception('User and private key required for ssh-key.'); + throw new Exception('Router authentication configuration incomplete.'); } } } @@ -62,11 +62,11 @@ final class SSH extends Authentication { $success = $this->connection->login($this->config['user'], $key); } else { - throw new Exception('Unknown type of connection for SSH.'); + throw new Exception('Unknown type of connection.'); } if (!$success) { - throw new Exception('SSH authentication failed.'); + throw new Exception('Cannot connect to router.'); } } diff --git a/auth/telnet.php b/auth/telnet.php index 2f3465d..15052ec 100644 --- a/auth/telnet.php +++ b/auth/telnet.php @@ -32,7 +32,7 @@ final class Telnet extends Authentication { protected function check_config() { if (!isset($this->config['user']) || !isset($this->config['pass'])) { - throw new Exception('User and password required for telnet.'); + throw new Exception('Router authentication configuration incomplete.'); } } -- cgit v1.2.3