Skip to content
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

Error handling isn't really working #342

Open
etki opened this issue Aug 15, 2017 · 0 comments
Open

Error handling isn't really working #342

etki opened this issue Aug 15, 2017 · 0 comments

Comments

@etki
Copy link

etki commented Aug 15, 2017

Given following Jakefile:

namespace('lint', function () {
  task('standard', {async: true}, function () {
    setTimeout(fail, 1)
  })
})

task('lint', {async: true}, function () {
  var task = jake.Task['lint:standard']
  task.addListener('error', function () {
    console.log('error intercepted')
  })
  task.invoke()
})

I expect to intercept lint:standard error in lint, however, this doesn't happen:

jake aborted.
Error
    at Timeout.api.fail [as _onTimeout] (/.../node_modules/jake/lib/api.js:350:13)
    at ontimeout (timers.js:386:14)
(See full trace by running task with --trace)
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

No branches or pull requests

1 participant