Skip to content

Commit 4b3051a

Browse files
committed
catch and show exceptions thrown at sending messages
1 parent 4bb6f47 commit 4b3051a

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/ThreadActivity.kt

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -432,12 +432,16 @@ class ThreadActivity : SimpleActivity() {
432432
}
433433
}
434434

435-
transaction.sendNewMessage(message, threadId.toLong())
436-
437-
thread_type_message.setText("")
438-
attachmentUris.clear()
439-
thread_attachments_holder.beGone()
440-
thread_attachments_wrapper.removeAllViews()
435+
try {
436+
transaction.sendNewMessage(message, threadId.toLong())
437+
438+
thread_type_message.setText("")
439+
attachmentUris.clear()
440+
thread_attachments_holder.beGone()
441+
thread_attachments_wrapper.removeAllViews()
442+
} catch (e: Exception) {
443+
showErrorToast(e)
444+
}
441445
}
442446

443447
// show selected contacts, properly split to new lines when appropriate

0 commit comments

Comments
 (0)