mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 17:24:07 +02:00
Throw connection errors in some extra cases
This commit is contained in:
parent
05e8c3b807
commit
8f8f8cbf5e
1 changed files with 7 additions and 0 deletions
|
|
@ -98,6 +98,13 @@ class NativeShare implements IShare {
|
||||||
throw new InvalidHostException($errorString);
|
throw new InvalidHostException($errorString);
|
||||||
} else if (strpos($errorString, 'Permission denied')) {
|
} else if (strpos($errorString, 'Permission denied')) {
|
||||||
throw new AccessDeniedException($errorString);
|
throw new AccessDeniedException($errorString);
|
||||||
|
} else if (strpos($errorString, 'unknown error (110)') or
|
||||||
|
strpos($errorString, 'unknown error (111)') or
|
||||||
|
strpos($errorString, 'unknown error (112)') or
|
||||||
|
strpos($errorString, 'unknown error (113)')) {
|
||||||
|
// errors for connection timeout, connection refused, host is down and
|
||||||
|
// no route to host, respectively
|
||||||
|
throw new ConnectionError($errorString);
|
||||||
} else {
|
} else {
|
||||||
throw new \Exception($errorString);
|
throw new \Exception($errorString);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue