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

Actually return promise in Comb::processFile #643

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

Holzhaus
Copy link

This makes it possible to catch exceptions in processFiles in
cli.js. Without this, node raises an error when promise throws an
exception:

node:internal/process/promises:245
          triggerUncaughtException(err, true /* fromPromise */);
          ^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "[object Object]".] {
  code: 'ERR_UNHANDLED_REJECTION'
}

This makes it possible to catch exceptions in `processFiles` in
`cli.js`. Without this, node raises an error when promise throws an
exception:

    node:internal/process/promises:245
              triggerUncaughtException(err, true /* fromPromise */);
              ^

    [UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "[object Object]".] {
      code: 'ERR_UNHANDLED_REJECTION'
    }
@Holzhaus
Copy link
Author

Ping.

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.

1 participant