forked from thephpleague/flysystem-ftp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUnableToResolveConnectionRoot.php
More file actions
30 lines (24 loc) · 925 Bytes
/
UnableToResolveConnectionRoot.php
File metadata and controls
30 lines (24 loc) · 925 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
declare(strict_types=1);
namespace League\Flysystem\Ftp;
use RuntimeException;
use Throwable;
final class UnableToResolveConnectionRoot extends RuntimeException implements FtpConnectionException
{
private function __construct(string $message, Throwable $previous = null)
{
parent::__construct($message, 0, $previous);
}
public static function itDoesNotExist(string $root, string $reason = ''): UnableToResolveConnectionRoot
{
return new UnableToResolveConnectionRoot(
'Unable to resolve connection root. It does not seem to exist: ' . $root . "\nreason: $reason"
);
}
public static function couldNotGetCurrentDirectory(string $message = ''): UnableToResolveConnectionRoot
{
return new UnableToResolveConnectionRoot(
'Unable to resolve connection root. Could not resolve the current directory. ' . $message
);
}
}