From 4bfa910205d424594e052e97c95e5d248a7a2ffe Mon Sep 17 00:00:00 2001 From: izik Date: Thu, 12 Apr 2018 17:09:23 +0300 Subject: [PATCH 1/2] Fix Java RuntimeException for failed queries. --- lib/resultset.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/resultset.js b/lib/resultset.js index cc63e56..d84109d 100644 --- a/lib/resultset.js +++ b/lib/resultset.js @@ -104,7 +104,13 @@ ResultSet.prototype.toObjectIter = function (callback) { types: _.map(colsmetadata, 'type'), rows: { next: function () { - var nextRow = self._rs.nextSync(); + var nextRow; + try { + nextRow = self._rs.nextSync(); // this row can lead to JavaRunTimeException - sould be cathced. + } + catch (error) { + callback(error); + } if (!nextRow) { return { done: true From 7d485387b7aa7ffe7201e7abd476707099ec985b Mon Sep 17 00:00:00 2001 From: izik Date: Thu, 12 Apr 2018 17:09:29 +0300 Subject: [PATCH 2/2] Fix Java RuntimeException for failed queries. --- lib/resultset.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/resultset.js b/lib/resultset.js index d84109d..5d78e6c 100644 --- a/lib/resultset.js +++ b/lib/resultset.js @@ -106,7 +106,7 @@ ResultSet.prototype.toObjectIter = function (callback) { next: function () { var nextRow; try { - nextRow = self._rs.nextSync(); // this row can lead to JavaRunTimeException - sould be cathced. + nextRow = self._rs.nextSync(); // this row can lead to Java RuntimeException - sould be cathced. } catch (error) { callback(error);