From 49ac37f907ed338ad39f4863b8de3e8e26111025 Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Sun, 9 Oct 2016 10:59:34 +0100 Subject: [PATCH] Don't print error code in UI error messages It's always -1 now, so providing it is pointless. --- src/gui/html/js/query.js | 2 +- src/tests/gui/html/js/test_query.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/html/js/query.js b/src/gui/html/js/query.js index 8197c75d..a1d56a22 100644 --- a/src/gui/html/js/query.js +++ b/src/gui/html/js/query.js @@ -22,7 +22,7 @@ persistent: false, onSuccess: resolve, onFailure: (errorCode, errorMessage) => { - reject(new Error(`Error code: ${errorCode}; ${errorMessage}`)); + reject(new Error(errorMessage)); }, }); }); diff --git a/src/tests/gui/html/js/test_query.js b/src/tests/gui/html/js/test_query.js index 15dfc5c2..6c0ba222 100644 --- a/src/tests/gui/html/js/test_query.js +++ b/src/tests/gui/html/js/test_query.js @@ -34,6 +34,6 @@ describe('query()', () => { ); it('should fail with an Error object when an error occurs', () => - loot.query('fail').should.be.rejectedWith(Error, { message: 'Error code: -1; {"name":"fail","args":[]}' }) + loot.query('fail').should.be.rejectedWith(Error, { message: '{"name":"fail","args":[]}' }) ); });