Add object diffs to error output

Also fixes util.logError tests to test util.getErrorMessage
instead where appropriate
Fix object diff unit tests

Some environments have no function names or stack traces