Skip to content

Commit 3a69e83

Browse files
committed
Fix: convert 할 때 runCatching 함
- convert 하려고 할 때 스트록을 작성하고 있으면 UnsupportedOperationException 발생 - convert 자체는 실패하더라도 앱 사용에 큰 무리가 없기 때문에 해당 exception 을 외부로 노출시키거나 하지 않음
1 parent c26f64c commit 3a69e83

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • myscript-iink/src/main/java/com/knowre/android/myscript/iink

myscript-iink/src/main/java/com/knowre/android/myscript/iink/MyScript.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,9 @@ internal class MyScript(
177177

178178
override fun convert() {
179179
convertingJob?.cancel()
180-
editor.let { it.convert(null, it.getSupportedTargetConversionStates(null)[0]) }
180+
runCatching {
181+
editor.let { it.convert(null, it.getSupportedTargetConversionStates(null)[0]) }
182+
}
181183
}
182184

183185
override fun import(jiix: Jiix) {

0 commit comments

Comments
 (0)