root 3bf41bf355 update | 1 ano atrás | |
---|---|---|
.. | ||
LICENSE | 1 ano atrás | |
README.md | 1 ano atrás | |
index.d.ts | 1 ano atrás | |
index.js | 1 ano atrás | |
package.json | 1 ano atrás |
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