Skip to content

Commit 31da66d

Browse files
author
Simon he
committed
chore: update
1 parent a1d24c3 commit 31da66d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/interceptError.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ export function interceptError(fn: Function) {
33
try {
44
resolve(fn())
55
}
6-
catch (error) {
7-
console.error(error)
8-
reject(error)
6+
catch (error: any) {
7+
reject(new Error(error))
98
}
109
})
1110
}

0 commit comments

Comments
 (0)