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) {