Skip to content

Commit 6f379db

Browse files
committed
Fix unhandled cancellation exception
1 parent b17e603 commit 6f379db

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Main.res

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ let getVersion = async () => {
1010

1111
let handleError = async (~outro, perform) =>
1212
try await perform() catch {
13-
| P.Canceled => P.cancel("Canceled.")
1413
| Exn.Error(error) =>
1514
switch error->Exn.message {
1615
| Some(message) => P.Log.error("Error: " ++ message)
@@ -58,4 +57,6 @@ https://www.rescript-lang.org`,
5857
}
5958
}
6059

61-
await run()
60+
try await run() catch {
61+
| P.Canceled => P.cancel("Canceled.")
62+
}

0 commit comments

Comments
 (0)