Skip to content

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