diff options
Diffstat (limited to 'src/content/usecases/MarkUseCase.ts')
-rw-r--r-- | src/content/usecases/MarkUseCase.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/content/usecases/MarkUseCase.ts b/src/content/usecases/MarkUseCase.ts index 002fdee..f5f512c 100644 --- a/src/content/usecases/MarkUseCase.ts +++ b/src/content/usecases/MarkUseCase.ts @@ -18,7 +18,7 @@ export default class MarkUseCase { async set(key: string): Promise<void> { const pos = this.scrollPresenter.getScroll(); if (this.globalKey(key)) { - this.client.setGloablMark(key, pos); + await this.client.setGloablMark(key, pos); await this.consoleClient.info(`Set global mark to '${key}'`); } else { this.repository.set(key, pos); @@ -32,7 +32,8 @@ export default class MarkUseCase { } else { const pos = this.repository.get(key); if (!pos) { - throw new Error("Mark is not set"); + await this.consoleClient.error("Mark is not set"); + return; } this.scroll(pos.x, pos.y); } |