question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Does not throw when file does not exist

See original GitHub issue

If a file does not exist there is no error. The promise resolves because and returns undefined on the yield fs.stat here:

    try {
      var stats = yield fs.stat(path);
      // nothing gets executed later on...

Not sure if that’s a bug in mz or with the usage by koa-send.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:14 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
haoxinscommented, Mar 26, 2017
0reactions
haoxinscommented, Apr 9, 2017

v4.0.0 published !

Read more comments on GitHub >

github_iconTop Results From Across the Web

Should my method throw its own exception, or let .NET throw if ...
Besides race condition, this code ignores situation where file exists but is not readable (because of permissions etc.), and possibly even more ...
Read more >
prevent error if file does not exist - Unix & Linux Stack Exchange
You have a few options. Avoid printing the file unless it exists, but still allow cat to complain if the file exists but...
Read more >
How to Fix the FileNotFoundException in Java.io - Rollbar
Here's an example of a FileNotFoundException thrown when trying to access a file that does not exist in the system:
Read more >
File Does Not Exist Python
In this python tutorial, we will discuss the File does not exist ... Here, we can see how check file does not exist...
Read more >
Python Check if Files Exist – os.path, Pathlib, try/except
Thus, even if a file is deleted somewhere between our if statement and the file operation, the file operation won't cause a program...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found