Add guard I forgot to add in 693b78001c

(Thanks @justinsb for noticing this!)
This commit is contained in:
Avital Oliver
2014-07-30 16:51:12 -07:00
parent d8e28eb74b
commit 30e02600b4

View File

@@ -1460,8 +1460,10 @@ var wrapInternalException = function (exception, context) {
// server log
if (!exception.expected) {
Meteor._debug("Exception " + context, exception.stack);
Meteor._debug("Sanitized and reported to the client as:", exception.sanitizedError.message);
Meteor._debug();
if (exception.sanitizedError) {
Meteor._debug("Sanitized and reported to the client as:", exception.sanitizedError.message);
Meteor._debug();
}
}
// Did the error contain more details that could have been useful if caught in