more descriptive error when refreshing shared files table

dbus-notify
Zlatin Balevsky 2022-06-08 18:14:16 +01:00
parent 27b734bc40
commit e5ad1f7ca6
No known key found for this signature in database
GPG Key ID: A72832072D525E41
1 changed files with 7 additions and 1 deletions

View File

@ -2143,7 +2143,13 @@ class MainFrameView {
void refreshSharedFilesTableRow(int row) {
JTable table = builder.getVariable("shared-files-table")
table.model.fireTableRowsUpdated(row, row)
try {
table.model.fireTableRowsUpdated(row, row)
} catch (IndexOutOfBoundsException bad) {
int modelSize = table.model.size()
int sharedSize = model.shared.size()
throw new Exception("Index out of bounds: row=$row sharedSize=$sharedSize modelSize=$modelSize", bad)
}
}
void fullUpdateIfColumnSorted(String tableName, int column) {