From 7cd3900228c7560704915a547ee468607a23aca9 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Sun, 29 Apr 2012 08:04:12 +0200 Subject: [PATCH] We don't need exception catching there --- frontend/classes/class.sshconnector.php | 8 -------- frontend/test.php | 1 + 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/frontend/classes/class.sshconnector.php b/frontend/classes/class.sshconnector.php index d60fefb..8fd7428 100644 --- a/frontend/classes/class.sshconnector.php +++ b/frontend/classes/class.sshconnector.php @@ -41,19 +41,11 @@ class SshConnector extends CPHPBaseClass return $this->DoCommand($command, $throw_exception); } - catch (SshCommandException $e) - { - throw new SshCommandException($e->getMessage()); - } catch (SshConnectException $e) { $error = $e->getMessage(); throw new SshCommandException("Could not run command {$command}: Failed to connect: {$error}"); } - catch (SshExitException $e) - { - throw new SshExitException($e->getMessage(), $e->getCode()); - } } public function RunCommandCached($command, $throw_exception = false) diff --git a/frontend/test.php b/frontend/test.php index 7da11e5..3915c8a 100644 --- a/frontend/test.php +++ b/frontend/test.php @@ -19,4 +19,5 @@ var_dump($sNode->sRealHostname); var_dump($sNode->sRealHostname); var_dump($sNode->sRealHostname); var_dump($sNode->sRealHostname); + ?>