Skip to content

Commit 924e1b2

Browse files
authored
Catch unexpected errors (#31)
1 parent 63234be commit 924e1b2

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

dist/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,11 @@ async function run () {
830830
}
831831

832832
;(async () => {
833-
await run()
833+
try {
834+
await run()
835+
} catch (error) {
836+
Object(_actions_core__WEBPACK_IMPORTED_MODULE_0__.setFailed)(error)
837+
}
834838
})()
835839

836840

index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,9 @@ async function run () {
6565
}
6666

6767
;(async () => {
68-
await run()
68+
try {
69+
await run()
70+
} catch (error) {
71+
setFailed(error)
72+
}
6973
})()

0 commit comments

Comments
 (0)