增加错误处理

This commit is contained in:
purocean
2018-07-27 15:45:32 +08:00
parent 47f7d1247a
commit a9d9fe7f3d
+4
View File
@@ -19,6 +19,10 @@ const convert = async (html, type) => {
}
})
process.on('error', error => {
reject(error)
})
process.stdin.write(html)
process.stdin.end()
})