From 6dec7dfbc17d8dec3e4e9c636b9ef18ba86e6e07 Mon Sep 17 00:00:00 2001 From: cTn Date: Sat, 30 Aug 2014 08:35:09 +0200 Subject: [PATCH] if unexpected data is received, throw an error instead of log, this will also attach a stack trace for easier debugging --- js/protocols/stm32.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/protocols/stm32.js b/js/protocols/stm32.js index 83138eaee2..8558bf1224 100644 --- a/js/protocols/stm32.js +++ b/js/protocols/stm32.js @@ -219,7 +219,7 @@ STM32_protocol.prototype.send = function (Array, bytes_to_read, callback) { // result = true/false STM32_protocol.prototype.verify_response = function (val, data) { if (val != data[0]) { - console.log('STM32 Communication failed, wrong response, expected: ' + val + ' received: ' + data[0]); + console.error('STM32 Communication failed, wrong response, expected: ' + val + ' received: ' + data[0]); GUI.log('STM32 Communication failed, wrong response, expected: ' + val + ' received: ' + data[0]); // disconnect