|
|
@ -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) { |
|
|
|