Skip to content

Commit 9fa0ea2

Browse files
committed
Add error printing option to regular translate too
1 parent df03860 commit 9fa0ea2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/kotlin/xyz/bluspring/unitytranslate/translator/LibreTranslateInstance.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ open class LibreTranslateInstance(val url: String, private var weight: Int, val
112112
return try {
113113
translate(from.code, to.code, text)
114114
} catch (e: Exception) {
115+
if (SHOULD_PRINT_ERRORS)
116+
e.printStackTrace()
117+
115118
null
116119
}
117120
}

0 commit comments

Comments
 (0)