Skip to content

Conversation

@TooTallNate
Copy link

Before:

> console.log(err.stack)
Error
    at new module.exports.TimeoutError (/Code/promise-timeout/index.js:44:16)
    at repl:1:13
    at Script.runInThisContext (vm.js:91:20)
    …

Now:

> console.log(err.stack)
TimeoutError: Promise did not resolve within 2000ms
    at repl:1:13
    at Script.runInThisContext (vm.js:91:20)
    …

@msangel
Copy link

msangel commented Dec 28, 2018

TimeoutError constructor should accept the message as the any error do.
So pt.timeout should accept 3rd optional argument which became that message

> messageOnError = "File loading time out!"
> pt.timeout(promise, timeout, messageOnError)
TimeoutError: File loading time out!
    at repl:1:13
    at Script.runInThisContext (vm.js:91:20)

@itsmunim
Copy link

itsmunim commented Jan 5, 2023

Why it was never merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants