root 3bf41bf355 update | 1 year ago | |
---|---|---|
.. | ||
LICENSE | 1 year ago | |
README.md | 1 year ago | |
index.d.ts | 1 year ago | |
index.js | 1 year ago | |
package.json | 1 year ago |
Error handling for Vinyl plugins.
var PluginError = require('plugin-error');
var err = new PluginError('test', {
message: 'something broke'
});
var err = new PluginError({
plugin: 'test',
message: 'something broke'
});
var err = new PluginError('test', 'something broke');
var err = new PluginError('test', 'something broke', { showStack: true });
var existingError = new Error('OMG');
var err = new PluginError('test', existingError, { showStack: true });
new PluginError(pluginName, message[, options])
Error constructor that takes:
pluginName
- a String
that should be the module name of your pluginmessage
- a String
message or an existing Error
objectoptions
- an Object
of your optionsBehavior:
options.showStack
to true if you think the stack is important for your error.err.toString()
, but may be omitted by including { showProperties: false }
in the options.MIT