From a23a3dedf96631022c624d8760af73ba30a7fe52 Mon Sep 17 00:00:00 2001 From: mechatroner Date: Sun, 10 Nov 2019 20:54:29 -0500 Subject: [PATCH] fix test --- test/library_demos/table_based.html | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/library_demos/table_based.html b/test/library_demos/table_based.html index 25617cb..3764367 100644 --- a/test/library_demos/table_based.html +++ b/test/library_demos/table_based.html @@ -42,15 +42,18 @@ let output_table = []; let user_query = document.getElementById('query_input').value; clear_html_table(document.getElementById('dst_table')); - let error_handler = function(error_type, error_msg) { - alert('RBQL Query finished with error: ' + error_type + ': ' + error_msg); + + let error_handler = function(exception) { + alert('RBQL Query finished with error: ' + String(exception)); } + let success_handler = function(warnings) { if (warnings.length) alert('Warnings: ' + warnings.join('\n')) write_html_table(output_table, document.getElementById('dst_table')); } - rbql.table_run(user_query, input_table, output_table, success_handler, error_handler); + + rbql.table_run(user_query, input_table, output_table).then(success_handler).catch(error_handler); } document.addEventListener("DOMContentLoaded", function(event) {