plugin-error

WebJar for plugin-error

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

plugin-error
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

plugin-error
WebJar for plugin-error
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/gulpjs/plugin-error

Download plugin-error

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/plugin-error/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>plugin-error</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/plugin-error/
implementation 'org.webjars.npm:plugin-error:1.0.1'
// https://jarcasting.com/artifacts/org.webjars.npm/plugin-error/
implementation ("org.webjars.npm:plugin-error:1.0.1")
'org.webjars.npm:plugin-error:jar:1.0.1'
<dependency org="org.webjars.npm" name="plugin-error" rev="1.0.1">
  <artifact name="plugin-error" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='plugin-error', version='1.0.1')
)
libraryDependencies += "org.webjars.npm" % "plugin-error" % "1.0.1"
[org.webjars.npm/plugin-error "1.0.1"]

Dependencies

compile (4)

Group / Artifact Type Version
org.webjars.npm : ansi-colors jar [1.0.1,2)
org.webjars.npm : arr-diff jar [4.0.0,5)
org.webjars.npm : arr-union jar [3.1.0,4)
org.webjars.npm : extend-shallow jar [3.0.2,4)

Project Modules

There are no modules declared in this project.

plugin-error

NPM version Downloads Build Status AppVeyor Build Status Coveralls Status Gitter chat

Error handling for Vinyl plugins.

Usage

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 });

API

new PluginError(pluginName, message[, options])

Error constructor that takes:

  • pluginName - a String that should be the module name of your plugin
  • message - a String message or an existing Error object
  • options - an Object of your options

Behavior:

  • By default the stack will not be shown. Set options.showStack to true if you think the stack is important for your error.
  • If you pass an error object as the message the stack will be pulled from that, otherwise one will be created.
  • If you pass in a custom stack string you need to include the message along with that.
  • Error properties will be included in err.toString(), but may be omitted by including { showProperties: false } in the options.

License

MIT

org.webjars.npm

gulp

A toolkit to automate & enhance your workflow

Versions

Version
1.0.1
0.1.2