From 3fbd1ab6188907bd12c0621e481df96bdceed0e0 Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Tue, 20 Jun 2017 16:12:30 -0700 Subject: [PATCH] Use error.stack instead of error for console log Chrome/V8 give you the error name, message and callstack at that property, where toString() gives you [object NavigatorUserMediaError] FREEBIE --- js/background.js | 2 +- js/debugLog.js | 2 +- js/views/recorder_view.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/js/background.js b/js/background.js index 605a423f6..59a25c4a0 100644 --- a/js/background.js +++ b/js/background.js @@ -156,7 +156,7 @@ }); var error; if ((error = c.validateNumber())) { - console.log(error); + console.log(error.stack); return; } diff --git a/js/debugLog.js b/js/debugLog.js index 921458cc0..e89e49b0b 100644 --- a/js/debugLog.js +++ b/js/debugLog.js @@ -71,7 +71,7 @@ }; window.onerror = function(message, script, line, col, error) { - console.log(error); + console.log(error.stack); }; } })(); diff --git a/js/views/recorder_view.js b/js/views/recorder_view.js index b4e419d37..2fbe2ed84 100644 --- a/js/views/recorder_view.js +++ b/js/views/recorder_view.js @@ -70,7 +70,7 @@ this.recorder.startRecording(); }, onError: function(error) { - console.log(error); + console.log(error.stack); this.close(); } });