From 1cc013ea1b5c9d3ec312b4352ed0054f8a1e2d0d Mon Sep 17 00:00:00 2001 From: Eric Rosenbaum Date: Mon, 2 Jul 2018 10:35:50 -0400 Subject: [PATCH] Stringify errors --- src/io/bleSession.js | 2 +- src/io/btSession.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/io/bleSession.js b/src/io/bleSession.js index 600373ea3..1596c721a 100644 --- a/src/io/bleSession.js +++ b/src/io/bleSession.js @@ -138,7 +138,7 @@ class BLESession extends JSONRPCWebSocket { _sendError (e) { this._connected = false; - log.error(`BLESession error: ${e}`); + log.error(`BLESession error: ${JSON.stringify(e)}`); this._runtime.emit(this._runtime.constructor.PERIPHERAL_ERROR); } } diff --git a/src/io/btSession.js b/src/io/btSession.js index d0dfea3c7..bf847296e 100644 --- a/src/io/btSession.js +++ b/src/io/btSession.js @@ -108,7 +108,7 @@ class BTSession extends JSONRPCWebSocket { } _sendError (e) { - log.error(`BLESession error: ${e}`); + log.error(`BTSession error: ${JSON.stringify(e)}`); this._runtime.emit(this._runtime.constructor.PERIPHERAL_ERROR); } }