From fd33600eda09e41bc268f2021d46124bcbc578c0 Mon Sep 17 00:00:00 2001 From: Ujjwal Gupta Date: Tue, 19 Sep 2023 15:47:49 +0400 Subject: [PATCH] add catch in initdb --- src/main/connection_helper.ts | 2 +- src/worker/query_manager.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/connection_helper.ts b/src/main/connection_helper.ts index 284cd982..0c9396c4 100644 --- a/src/main/connection_helper.ts +++ b/src/main/connection_helper.ts @@ -1,6 +1,6 @@ import { LogHelper } from "./log_helper"; import { - WebWorkerRequest, EventQueue, API, WebWorkerResult, + WebWorkerRequest, API, WebWorkerResult, EVENT, promise, IDataBase, IDbInfo, TMiddleware, promiseResolve } from "../common"; diff --git a/src/worker/query_manager.ts b/src/worker/query_manager.ts index bc374c12..7d73fd8e 100644 --- a/src/worker/query_manager.ts +++ b/src/worker/query_manager.ts @@ -318,8 +318,8 @@ export class QueryManager { this.util ).then(() => { res(dbInfo); - }); - }); + }).catch(rej); + }).catch(rej); } else { MetaHelper.get( @@ -329,7 +329,7 @@ export class QueryManager { this.util.db = value; dbInfo.database = userDbSchema(this.db); res(dbInfo); - }); + }).catch(rej) } }).catch(rej); });