summaryrefslogtreecommitdiff
path: root/ext/bg/js/backend.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-06-21 16:12:56 -0400
committerGitHub <noreply@github.com>2020-06-21 16:12:56 -0400
commit244ab31bb2edb53ff7aecb51d2dd60b50a24c194 (patch)
treee274e1521b630d0b455b30e5968230020367ced0 /ext/bg/js/backend.js
parente23504613f8526b90a497512c086ed48e66cde95 (diff)
Generic database (#600)
* Update test * Rename db to _db * Create GenericDatabase class * Catch prepare error * Allow database to be purged even if it was not open * Remove unused functions * Change static functions to non-static * Delete and count using the media object store * Update tests
Diffstat (limited to 'ext/bg/js/backend.js')
-rw-r--r--ext/bg/js/backend.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js
index a8ee9f83..b89cb641 100644
--- a/ext/bg/js/backend.js
+++ b/ext/bg/js/backend.js
@@ -172,7 +172,11 @@ class Backend {
yomichan.on('log', this._onLog.bind(this));
await this.environment.prepare();
- await this.database.prepare();
+ try {
+ await this.database.prepare();
+ } catch (e) {
+ yomichan.logError(e);
+ }
await this.translator.prepare();
await profileConditionsDescriptorPromise;