Bug 463122 - Improve xpcshell error reporting for generic exceptions caught at the top level. r=ted

This commit is contained in:
Josh Matthews 2011-12-28 11:57:28 -05:00
Родитель d9f302116b
Коммит 0de1d98af2
1 изменённых файлов: 10 добавлений и 1 удалений

Просмотреть файл

@ -334,7 +334,16 @@ function _execute_test() {
// possible that this will mask an NS_ERROR_ABORT that happens after a
// do_check failure though.
if (!_quit || e != Components.results.NS_ERROR_ABORT) {
msg = "TEST-UNEXPECTED-FAIL | (xpcshell/head.js) | " + e;
msg = "TEST-UNEXPECTED-FAIL | ";
if ('fileName' in e) {
msg += e.fileName;
if ('lineNumber' in e) {
msg += ":" + e.lineNumber;
}
} else {
msg += "xpcshell/head.js";
}
msg += " | " + e;
if (e.stack) {
_dump(msg + " - See following stack:\n");
_dump_exception_stack(e.stack);