Remove unused formatException from util
The ExceptionFormatter is used instead of formatException from jasmine util
This commit is contained in:
@@ -156,33 +156,6 @@ getJasmineRequireObj().util = function() {
|
|||||||
childClass.prototype = new subclass();
|
childClass.prototype = new subclass();
|
||||||
};
|
};
|
||||||
|
|
||||||
util.formatException = function(e) {
|
|
||||||
var lineNumber;
|
|
||||||
if (e.line) {
|
|
||||||
lineNumber = e.line;
|
|
||||||
}
|
|
||||||
else if (e.lineNumber) {
|
|
||||||
lineNumber = e.lineNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
var file;
|
|
||||||
|
|
||||||
if (e.sourceURL) {
|
|
||||||
file = e.sourceURL;
|
|
||||||
}
|
|
||||||
else if (e.fileName) {
|
|
||||||
file = e.fileName;
|
|
||||||
}
|
|
||||||
|
|
||||||
var message = (e.name && e.message) ? (e.name + ': ' + e.message) : e.toString();
|
|
||||||
|
|
||||||
if (file && lineNumber) {
|
|
||||||
message += ' in ' + file + ' (line ' + lineNumber + ')';
|
|
||||||
}
|
|
||||||
|
|
||||||
return message;
|
|
||||||
};
|
|
||||||
|
|
||||||
util.htmlEscape = function(str) {
|
util.htmlEscape = function(str) {
|
||||||
if (!str) return str;
|
if (!str) return str;
|
||||||
return str.replace(/&/g, '&')
|
return str.replace(/&/g, '&')
|
||||||
|
|||||||
@@ -9,33 +9,6 @@ getJasmineRequireObj().util = function() {
|
|||||||
childClass.prototype = new subclass();
|
childClass.prototype = new subclass();
|
||||||
};
|
};
|
||||||
|
|
||||||
util.formatException = function(e) {
|
|
||||||
var lineNumber;
|
|
||||||
if (e.line) {
|
|
||||||
lineNumber = e.line;
|
|
||||||
}
|
|
||||||
else if (e.lineNumber) {
|
|
||||||
lineNumber = e.lineNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
var file;
|
|
||||||
|
|
||||||
if (e.sourceURL) {
|
|
||||||
file = e.sourceURL;
|
|
||||||
}
|
|
||||||
else if (e.fileName) {
|
|
||||||
file = e.fileName;
|
|
||||||
}
|
|
||||||
|
|
||||||
var message = (e.name && e.message) ? (e.name + ': ' + e.message) : e.toString();
|
|
||||||
|
|
||||||
if (file && lineNumber) {
|
|
||||||
message += ' in ' + file + ' (line ' + lineNumber + ')';
|
|
||||||
}
|
|
||||||
|
|
||||||
return message;
|
|
||||||
};
|
|
||||||
|
|
||||||
util.htmlEscape = function(str) {
|
util.htmlEscape = function(str) {
|
||||||
if (!str) return str;
|
if (!str) return str;
|
||||||
return str.replace(/&/g, '&')
|
return str.replace(/&/g, '&')
|
||||||
|
|||||||
Reference in New Issue
Block a user