Expose match failures in server logs

This commit is contained in:
Avital Oliver
2014-07-30 12:00:51 -07:00
parent e78861b7d0
commit 47831e8744

View File

@@ -1456,6 +1456,11 @@ var wrapInternalException = function (exception, context) {
if (!exception || exception instanceof Meteor.Error)
return exception;
// tests can set the 'expected' flag on an exception so it won't go to the
// server log
if (!exception.expected)
Meteor._debug("Exception " + context, exception.stack);
// Did the error contain more details that could have been useful if caught in
// server code (or if thrown from non-client-originated code), but also
// provided a "sanitized" version with more context than 500 Internal server
@@ -1467,11 +1472,6 @@ var wrapInternalException = function (exception, context) {
"is not a Meteor.Error; ignoring");
}
// tests can set the 'expected' flag on an exception so it won't go to the
// server log
if (!exception.expected)
Meteor._debug("Exception " + context, exception.stack);
return new Meteor.Error(500, "Internal server error");
};