Fixed 'Parse URI' operation and improved error handling from worker

This commit is contained in:
n1474335 2017-10-13 11:29:22 +00:00
parent ec7294d734
commit 599fefb39b
9 changed files with 61 additions and 56 deletions

View file

@ -88,9 +88,10 @@ App.prototype.loaded = function() {
* An error handler for displaying the error to the user.
*
* @param {Error} err
* @param {boolean} [logToConsole=false]
*/
App.prototype.handleError = function(err) {
console.error(err);
App.prototype.handleError = function(err, logToConsole) {
if (logToConsole) console.error(err);
const msg = err.displayStr || err.toString();
this.alert(msg, "danger", this.options.errorTimeout, !this.options.showErrors);
};