Bug 965527 - Be even more careful with AsyncShutdown logging. r=yoric

This commit is contained in:
David Rajchenbach-Teller 2014-02-13 14:12:40 -05:00
parent 4f2e96c2f0
commit 9be4aecee9

View File

@ -123,15 +123,17 @@ function safeGetState(state) {
let data = JSON.parse(string);
// Simplify the rest of the code by ensuring that we can simply
// concatenate the result to a message.
data.toString = function() {
return string;
};
if (data && typeof data == "object") {
data.toString = function() {
return string;
};
}
return data;
} catch (ex) {
try {
return "Error getting state: " + ex;
return "Error getting state: " + ex + " at " + ex.stack;
} catch (ex2) {
return "Could not display error";
return "Error getting state but could not display error";
}
}
}