Skip to content

Commit e6e7e67

Browse files
committed
Log more context for the past crash
1 parent bc4fe2d commit e6e7e67

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,13 @@ class AztecText : AppCompatAutoCompleteTextView, TextWatcher, UnknownHtmlSpan.On
971971
Selection.setSelection(editable, max)
972972

973973
disableTextChangedListener()
974-
editable.replace(min, max, builder)
974+
// FIXME
975+
try {
976+
editable.replace(min, max, builder)
977+
} catch (e: RuntimeException) {
978+
// try to get more context for this crash: https://github.com/wordpress-mobile/AztecEditor-Android/issues/424
979+
throw RuntimeException("min: $min; max: $max; text: ${editable.toString()}; pasted: ${builder.toString()}", e)
980+
}
975981
enableTextChangedListener()
976982

977983
inlineFormatter.joinStyleSpans(0, editable.length) //TODO: see how this affects performance

0 commit comments

Comments
 (0)