Skip to content

Fix error reporting of lessc executable - #2884

Closed
jhnns wants to merge 1 commit into
less:masterfrom
jhnns:fix/error-reporting
Closed

jhnns wants to merge 1 commit into
less:masterfrom
jhnns:fix/error-reporting

Conversation

@jhnns

@jhnns jhnns commented Apr 27, 2016 •

Copy link
Copy Markdown
Contributor

This commit replaces the old control flow of exiting the process when an error occurred which swallowed the error in some situations (#2881). Additionally, it also adds a listener for "unhandledRejection" to also catch errors caused by rejected promises.

I'm calling process.exit() directly because I cannot reproduce that calling process.exit does not flush stdout always (has been added some time ago with 2d8ede3).

I've also added a small "padding" around the error message which looks nicer in the terminal (inspired by mocha): EDIT: Has been removed after discussion

bildschirmfoto 2016-04-27 um 19 40 39
bildschirmfoto 2016-04-27 um 19 49 40

This commit replaces the old control flow of exiting the process when an error occurred which swallowed the error in some situations (less#2881). Additionally, it also adds a listener for "unhandledRejection" to also catch errors caused by rejected promises.
@jhnns
jhnns force-pushed the fix/error-reporting branch from 5905492 to 0bbb1c5 Compare April 28, 2016 08:10
@jhnns

jhnns commented Apr 28, 2016

Copy link
Copy Markdown
Contributor Author

Seams reasonable to me 👍
I've removed the padding.

@jhnns

jhnns commented May 3, 2016

Copy link
Copy Markdown
Contributor Author

I've created a new PR that incorporates the changes as discussed in #2881

@jhnns jhnns closed this May 3, 2016
@jhnns
jhnns deleted the fix/error-reporting branch May 3, 2016 09:10
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