jeffbski / wait-on

wait-on is a cross-platform command line utility and Node.js API which will wait for files, ports, sockets, and http(s) resources to become available
MIT License
1.87k stars 77 forks source link

Suggestion: Timeout error message should include remaining resources in the message #72

Closed jmealo closed 4 years ago

jmealo commented 4 years ago

It would be great if the error returned when a timeout occurs included the output of determineRemainingResources in the message (or as a property). If you'd like I can do a PR for either/or.

Thanks, Jeff

jeffbski-rga commented 4 years ago

@jmealo yes, that is a good idea, that way it goes back with the error. Currently if you enable logging you will see a log message with the remaining resources, but it would be nice to have it as part of the error too.

So yes, if you want to create a PR that would be wonderful. Thanks!

jmealo commented 4 years ago

@jeffbski-rga: Thanks for the quick response: #73 is a PR implementing this. I took a few stabs at this to keep the current behavior unchanged. Presently, stack traces are output for non-timeout errors (which is desirable). Stack traces for timeouts are not helpful as they point to some rxjs internals, so I'm omitting them to match current behavior.

jmealo commented 4 years ago

@jeffbski: I tweaked this a bit. I think db03720 matches the coding style/log output better.