-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
Missing error handling (e.g. files that do not exist) #11
Comments
Thank you for reporting this @janhapke, I've just pushed 194f259 adding a check for this specific case. Normally I would suggest checking first before running an operation like this as you can also use the objects to create non-existing files and directories. But this is a special case where the check should have ben handled inside the package. Thanks again for reporting 👍 |
I would actually expect the same using the long form and it's not happening either:
Same check needs to go for opening for reading? Funny enough it not only doesn't error the loop also keeps running while it stops when an existing file has been fully read. Update If thats not possible (actually even if) it would be nice if
|
I'm trying to read the contents of a file that does not exist, for example like this:
Now, since the file does not exist, I would expect the promise to be rejected and thus the second function to be called (and an error message printed). However, nothing happens.
Quickly browsing through the code, I couldn't see any error handling / rejecting of promises at all. Am I missing something? How should I handle errors when reading files?
The text was updated successfully, but these errors were encountered: