Skip to content

Commit

Permalink
show error dialog if failed get adb logcat
Browse files Browse the repository at this point in the history
  • Loading branch information
cdcsgit committed Dec 23, 2021
1 parent 32d75e5 commit 8de43a8
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/com/blogspot/kotlinstudy/lognote/LogTableModel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ package com.blogspot.kotlinstudy.lognote

import java.awt.Color
import java.io.*
import javax.swing.table.AbstractTableModel
import java.lang.Exception
import java.util.*
import java.util.regex.Pattern
import javax.swing.JOptionPane
import javax.swing.SwingUtilities
import java.util.Stack
import java.util.ArrayList
import javax.swing.table.AbstractTableModel


class LogTableModelEvent(source:LogTableModel, change:Int, removedCount:Int) {
Expand Down Expand Up @@ -1019,7 +1018,12 @@ class LogTableModel() : AbstractTableModel() {
println("Change save file : " + mLogFile?.absolutePath)
}
line = bufferedReader.readLine()
} catch (e:InterruptedException) {
} catch (e:Exception) {
println("Start scan : $e")
if (e !is InterruptedException) {
JOptionPane.showMessageDialog(null, e.toString(), "Error", JOptionPane.ERROR_MESSAGE)
}

try {
mFileWriter?.flush()
} catch(e:IOException) {
Expand Down

0 comments on commit 8de43a8

Please sign in to comment.