mirror of
https://gitlab.com/KevinRoebert/ClearUrls
synced 2025-12-15 21:55:36 +07:00
Added catch statements
This commit is contained in:
@@ -75,7 +75,7 @@ function saveOnDisk(keys) {
|
||||
});
|
||||
|
||||
console.log(translate('core_save_on_disk'));
|
||||
browser.storage.local.set(json);
|
||||
browser.storage.local.set(json).catch(handleError);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -114,7 +114,7 @@ function genesis() {
|
||||
|
||||
// Start history listener
|
||||
historyListenerStart();
|
||||
}, error);
|
||||
}, handleError);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -164,14 +164,6 @@ function setData(key, value) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Write error on console.
|
||||
*/
|
||||
function error(e) {
|
||||
console.log(translate('core_error'));
|
||||
console.error(e);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set default values, if the storage is empty.
|
||||
* @param {Object} items
|
||||
|
||||
Reference in New Issue
Block a user