Repository navigation
Description
Before you open this issue, please complete the following tasks:
- use the search bar at the top of the page to search this repository for similar issues or discussions that have already been opened.
- if you are looking for help from the gulp team or community, open a discussion.
- if you think there is a problem with the plugin you're using, open a discussion.
- if you think there is a bug in our code, open this issue.
What were you expecting to happen?
Reporting this as a bug because it seems that the be behavior was not intended, but it could be also a feature.
The idea is that the output of a plugin-error should not include irrelevant information like the domainEmitter.
Related: gulpjs/gulp#1329
What actually happened?
Currently the output includes a domainEmitter property with no helpful information when the error is emitted by a stream.
Please give us a sample of your gulpfile
My actual use case involves a self-written gulp plugin that uses plugin-error behind the scenes.
The following is a minimal example that shows the problem:
// gulptask.js
const gulp = require('gulp');
const PluginError = require('plugin-error');
const { PassThrough } = require('stream');
gulp.task('fail', function () {
return new PassThrough({
final: cb => cb(new PluginError('my-plugin', 'My message')),
objectMode: true
}).end();
});Terminal output / screenshots
$ gulp failThis will print:
Message:
My message
Details:
domainEmitter: [object Object]
It would be great if the output could be just
Message:
My message
Please provide the following information:
- OS & version: Windows 10
- node version: 18.12.1
- npm version (run
npm -v): 8.19.2 - gulp version (run
gulp -v): 4.0.2
Additional information
The simplest solution would be to domainEmitter to the set of ignored properties: https://github.com/gulpjs/plugin-error/blob/v2.0.0/index.js#L5-L15
I would gladly create a PR if the team agrees on this issue.
Activity
phated commentedon Dec 5, 2022
Duplicate of #14
fasttime commentedon Dec 5, 2022
Ah sorry, I saw the other issue but I thought it was related to
console.log. I guess this can be closed then.