exc.stack -> (exc.stack || exc) so if exc is a message (e.g. knockout sends a message) you'll get the message instead of undefined

This commit is contained in:
Marc 2015-04-22 09:32:28 +02:00
parent 3304a7e341
commit 483e19adb6

View file

@ -458,7 +458,7 @@ $(function() {
ko.applyBindings(viewModel, element);
log.debug("View model", viewModel.constructor.name, "bound to", target);
} catch (exc) {
log.error("Could not bind view model", viewModel.constructor.name, "to target", target, ":", exc.stack);
log.error("Could not bind view model", viewModel.constructor.name, "to target", target, ":", (exc.stack || exc));
}
});
}