Add path not exists exception which specifies the path#41
Open
Add path not exists exception which specifies the path#41
Conversation
Specify the path which doesn't exist when the path doesn't exist.
enumag
reviewed
Apr 13, 2020
src/PathDoesNotExistException.php
Outdated
Comment on lines
7
to
13
| class PathDoesNotExistException extends FileSystemException | ||
| { | ||
| public function __construct(string $path) | ||
| { | ||
| parent::__construct(sprintf('Specified path "%s" does not exist', $path)); | ||
| } | ||
| } |
Contributor
There was a problem hiding this comment.
I recommend also adding a getter for the path. It might help custom exception handling.
Author
|
There doesn't seem to be any tests for path not exists - and I think it should be consistent across drivers, so could do:
|
kelunik
reviewed
Apr 13, 2020
|
|
||
| namespace Amp\File; | ||
|
|
||
| class PathDoesNotExistException extends FilesystemException |
Contributor
|
Shouldn't you update all drivers? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 )