gulp-uglify-error.js 471 B

12345678910111213141516
  1. 'use strict';
  2. var makeErrorCause = require('make-error-cause');
  3. var gulpUglifyError = makeErrorCause('GulpUglifyError');
  4. gulpUglifyError.prototype.toString = function() {
  5. var cause = this.cause || {};
  6. return (
  7. makeErrorCause.BaseError.prototype.toString.call(this) +
  8. (this.fileName ? '\nFile: ' + this.fileName : '') +
  9. (cause.line ? '\nLine: ' + cause.line : '') +
  10. (cause.col ? '\nCol: ' + cause.col : '')
  11. );
  12. };
  13. module.exports = gulpUglifyError;