-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add path not exists exception which specifies the path #41
base: 2.x
Are you sure you want to change the base?
Conversation
Specify the path which doesn't exist when the path doesn't exist.
src/PathDoesNotExistException.php
Outdated
class PathDoesNotExistException extends FileSystemException | ||
{ | ||
public function __construct(string $path) | ||
{ | ||
parent::__construct(sprintf('Specified path "%s" does not exist', $path)); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommend also adding a getter for the path. It might help custom exception handling.
There doesn't seem to be any tests for path not exists - and I think it should be consistent across drivers, so could do:
|
|
||
namespace Amp\File; | ||
|
||
class PathDoesNotExistException extends FilesystemException |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe FileNotFoundException
?
Shouldn't you update all drivers? |
Specify the path which doesn't exist when the path doesn't exist.
I can't test this locally as I don't have the necessary extensions (eio, uv) to install the dev dependencies.I manually deleted the extension deps from composer.Looks like you also need to update Travis - the legacy integrations have broken.. (you can migrate here )