Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Call toString on Error objects when logging to console. #109

Merged
merged 1 commit into from

2 participants

Ted Tate John Boxall
Ted Tate
Owner

Proposed fix for #108.

Tested in Chrome 27 and Safari 6.

Your thoughts @noahadams @rrjamie?

John Boxall
Owner

:+1:

John Boxall johnboxall merged commit b995560 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
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);
}
Something went wrong with that request. Please try again.