Enhanced Error module #1329

Open
aparajita opened this Issue Oct 17, 2015 · 13 comments

Projects

None yet

2 participants

@aparajita

In gulp 3, when errors were logged the output was colored nicely, with separate colors for filenames, plugin name, etc. Now everything is red, which is quite hard to look at and to parse visually.

In addition, we get "Details" which look like this:

Details:
    domainEmitter: [object Object]
    domain: [object Object]
    domainThrown: false

Not especially helpful.

Were these changes by design, or is it something that should be fixed?

@phated
Member
phated commented Oct 19, 2015

This is due to thrown errors being caught using domains. Please post screenshots of before/after for the colors?

@phated
Member
phated commented Nov 9, 2015

Pinging thread for the requested information.

@phated phated modified the milestone: gulp 4, gulp-cli 1.1.0 Nov 12, 2015
@phated phated added gulp-cli and removed gulp4 labels Nov 18, 2015
@aparajita

Colors seem to be okay now. But the useless details remain.

@aparajita

If domainThrown: false, it seems to me that anything related to domains in the details should be removed, and if there is nothing left after removing domains, details can be skipped.

@phated
Member
phated commented Nov 24, 2015

I completely disagree that the domain information should be thrown away. Nothing changed in the color. I don't think there is anything to do here.

@aparajita

I'm not ranting, but from a user's perspective it might as well say this:

Details:
    domainEmitter: [Totally useless info]
    domain: [Totally useless info]
    domainThrown: false (and since there's no useful info about the actual domain, this is useless as well)

What is it actually telling the user if the values are hidden?

@phated
Member
phated commented Nov 24, 2015

I agree that the current output isn't helpful, but that doesn't mean we should remove it. I believe domains have more of the stack trace on those properties, so we just need to expose it instead of removing important information

@aparajita

Agreed.

@phated
Member
phated commented Dec 18, 2015

@aparajita can you provide me with an example task that generates the domain error object? Every task I make error is showing a proper stack trace.

@aparajita

Unzip the attached directory, then:

cd test
npm i
gulp

test.zip

@phated
Member
phated commented Dec 21, 2015

Alright. I've dug into this and it seems that the domains information doesn't have anything worth extracting at the point in which we receive it. The PluginError of gulp-util (or maybe its successor) will need to add those properties to the the properties it filters when toString() is called. I don't see any information that was lost in the 4.0 changes, just those properties added.

@phated phated removed this from the gulp-cli 1.1.0 milestone Dec 21, 2015
@aparajita

I've dug into this and it seems that the domains information doesn't have anything worth extracting at the point in which we receive it. The PluginError of gulp-util (or maybe its successor) will need to add those properties to the the properties it filters when toString() is called.

Which was precisely my contention and proposed solution from the beginning. 😉

@phated
Member
phated commented Dec 21, 2015

Note that gulp-util is deprecated so this likely will not be changed there. Plugin authors will need to switch to our alternative once we have it created.

@phated phated added gulp-util and removed gulp-cli labels Dec 21, 2015
@phated phated referenced this issue in gulpjs/gulp-cli Feb 9, 2016
Closed

Continue flag fails.. many times. #60

@phated phated added this to the gulp 4 milestone Apr 5, 2016
@phated phated changed the title from Gulp 4: better error logging to Enhanced Error module Apr 5, 2016
@phated phated added the help wanted label Apr 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment