Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: mobify/mobifyjs
...
head fork: mobify/mobifyjs
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 2 contributors
Commits on Mar 05, 2013
Ted Tate tedtate Call toString on Error objects when logging to console. 53d7664
Commits on Mar 06, 2013
John Boxall johnboxall Merge pull request #109 from mobify/error-logging
Call toString on Error objects when logging to console.
b995560
Showing with 3 additions and 0 deletions.
  1. +3 −0  api/logging.js
3  api/logging.js
View
@@ -23,8 +23,11 @@
if (obj) {
$.each(obj, function(key, value) {
noneWritten && console.group(title);
+
if (typeof key == "number") {
console[fn].apply(window, value);
+ } else if (value instanceof Error) {
+ console.error(key, value.toString());
} else {
console[fn](key, value);
}

No commit comments for this range

Something went wrong with that request. Please try again.