2.0.1 • Published 3 years ago

plugin-error v2.0.1

Weekly downloads
2,376,457
License
MIT
Repository
github
Last release
3 years ago

plugin-error

NPM version Downloads Build Status Coveralls Status

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

@crxs/gulp-crxgulp-rev-collectreact-native-bluetooth2killi8n-react-native-fast-imageeditorconfig-lint-jshandywebpackcss-module-typescript-definition-creator-pluginrn-send-sms@rock-kit/ui-icons-buildreact-native-template-rfbasegulp-html-elements@doggistyle/library@anho/circleci-orb-toolsairscanairscan-examplereact-native-esc-pos-sahaab@borisovart/atol-kkt-module@sumaq/gulp-mustache-jsonthunderbirddeneme323112gulp-imu-importerftmn@piyushmishra/critical@ntt_app/react-native-custom-notificationgulp-impale@spothero/ace@temporg/ui-icons-buildgulp-abraiareact-native-covid-sdkreact-native-thanh-toast-library@thanhnguyen14797/react-native-thanh-toast-library@avrora/avszoos-mp-gulp-cdnifyreact-native-printer-brothersrn-pdf-reader-offline@gulp-amp/default@conorepo/gulp-amp@conorepo/gulp-whitespaces@sproutsocial/gulp-srigulp-plugin-aliuniappgulp-daiamond-princess-zoningui5-toolkit-gulpgulp-asset-visiongulp-regular-versiongulp-sitemap-re@infinitebrahmanuniverse/nolb-plugcp-gulp-prettiergulp-twigjs@everything-registry/sub-chunk-2448@doamatto/gulp-compile-handlebarstest-aisi-vuewindy-gulp-typescriptwx-html-complierwx-html-complier-kwx-htmlminify-kxl-gulp-lesshintwx-jsonminify-kxfx-gulp-revxfx-gulp-rev-collectortempaw-functionstempaw-functions-zemeztempaw-zemez-functionstemplate-inittemplate-renderspfx-base-data-servicestestnpm_lmnsuscipitconsequaturth-gulphelpersvst-gulp-cssimportvscode-gulp-watchvitaeexercitationemvideo-multi-uploaderverbvoluptaspossimus@donmahallem/gulp-ncc@donmahallem/gulp-sharp@docta/gulp-csscomb@docta/gulp-htmlmin@docta/gulp-imagemin@docta/gulp-inline@docta/gulp-prettier@docta/gulp-stylelint@distelll/gulp-ng-annotate-patched@doggistyle/sass@doamatto/gulp-eslint@creativestyle/magesuite-frontend-builder@ctfdio/picocss-themes@ct.js/gulp-typescript@compodoc/gulp-compodoc@comsultia/gulp-l10n-js@dameblanche/task-mails@colours/gulp-helix@corelmax/react-native-my2c2p-sdk@d3r/gulp-sass@douhao/tslint@dovca/gulp-mjml@bva/gulp-shopify-upload@blakedarlin/gulp-sass@benthemonkey/gulp-s3-upload@roundingwellos/gulp-rsync
2.0.1

3 years ago

2.0.0

3 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago