mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-04 01:34:07 +02:00
Move Exceptions to their own namespace
This commit is contained in:
parent
5ab73b1afd
commit
5c57d2d094
22 changed files with 233 additions and 123 deletions
|
|
@ -7,6 +7,10 @@
|
|||
|
||||
namespace Icewind\SMB;
|
||||
|
||||
use Icewind\SMB\Exception\AuthenticationException;
|
||||
use Icewind\SMB\Exception\ConnectionException;
|
||||
use Icewind\SMB\Exception\InvalidHostException;
|
||||
|
||||
class Connection extends RawConnection {
|
||||
const DELIMITER = 'smb:';
|
||||
|
||||
|
|
@ -22,12 +26,12 @@ class Connection extends RawConnection {
|
|||
/**
|
||||
* get all unprocessed output from smbclient until the next prompt
|
||||
*
|
||||
* @throws ConnectionError
|
||||
* @throws ConnectionException
|
||||
* @return string
|
||||
*/
|
||||
public function read() {
|
||||
if (!$this->isValid()) {
|
||||
throw new ConnectionError();
|
||||
throw new ConnectionException();
|
||||
}
|
||||
$line = $this->readLine(); //first line is prompt
|
||||
$this->checkConnectionError($line);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue