mirror of
https://github.com/dawidd6/action-send-mail.git
synced 2024-12-26 19:13:06 +07:00
main: try catch block
This commit is contained in:
parent
fced312130
commit
ae7db41acb
4
main.js
4
main.js
@ -12,6 +12,7 @@ function get_body(body) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
|
try {
|
||||||
server_address = core.getInput("server_address", { required: true })
|
server_address = core.getInput("server_address", { required: true })
|
||||||
server_port = core.getInput("server_port", { required: true })
|
server_port = core.getInput("server_port", { required: true })
|
||||||
username = core.getInput("username", { required: true })
|
username = core.getInput("username", { required: true })
|
||||||
@ -41,6 +42,9 @@ async function main() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
console.log(info)
|
console.log(info)
|
||||||
|
} catch (error) {
|
||||||
|
core.setFailed(error.message)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
main()
|
main()
|
Loading…
Reference in New Issue
Block a user