UNPKG

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