csscomb / csscomb.js

CSS coding style formatter
http://csscomb.com/
MIT License
3.29k stars 457 forks source link

Actually return promise in Comb::processFile #643

Open Holzhaus opened 3 years ago

Holzhaus commented 3 years ago

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 commented 3 years ago

Ping.