Commit 3a57d51b authored by Him188's avatar Him188 Committed by GitHub

Merge pull request #143 from kenvix/master

Fixed a issue that cause bot initialization failed on headless platform
parents b89c3f88 4eb5c861
...@@ -49,11 +49,15 @@ class DefaultLoginSolver( ...@@ -49,11 +49,15 @@ class DefaultLoginSolver(
} }
tempFile.inputStream().use { tempFile.inputStream().use {
val img = ImageIO.read(it) try {
if (img == null) { val img = ImageIO.read(it)
logger.info("无法创建字符图片. 请查看文件") if (img == null) {
} else { logger.info("无法创建字符图片. 请查看文件")
logger.info(img.createCharImg()) } else {
logger.info(img.createCharImg())
}
} catch (throwable: Throwable) {
logger.info("创建字符图片时出错(${throwable.toString()})。请查看文件")
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment