Browse Source

Fixes issues with errors

patch-2
Esteban Ordano 10 years ago
parent
commit
121b9fc090
  1. 1
      .gitignore
  2. 6
      lib/errors/build.js
  3. 2
      package.json

1
.gitignore

@ -15,3 +15,4 @@ npm-debug.log
apiref
bower_components
dist
report

6
lib/errors/build.js

@ -14,10 +14,10 @@ var formatMessage = function(message) {
var defineElement = function(fullName, baseClass, message) {
return fullName + ' = function() {\n' +
' this.message = ' + formatMessage(message) + ';\n' +
' ' + baseClass + '.call(this, this.message);\n' +
' this.name = "' + fullName + '";\n' +
' this.stack = (new Error()).stack;\n' +
'};\n' +
'inherits(' + fullName + ', ' + baseClass + ');\n\n';
fullName + '.prototype = Object.create(' + baseClass + '.prototype);\n' +
fullName + '.prototype.name = "' + fullName + '";\n\n';
};
var traverseNode = function(baseClass, errorDefinition) {

2
package.json

@ -9,7 +9,7 @@
"test": "gulp test-all",
"coverage": "gulp coverage",
"build": "gulp",
"postinstall": "node_modules/gulp/bin/gulp.js browser-all"
"postinstall": "node ./lib/errors/build.js"
},
"contributors": [
{

Loading…
Cancel
Save