coverity#1326629 DE: Dropped or ignored exception

Change-Id: Ifb82c92eb0eaa019a19deee3dce375204576e2ee
This commit is contained in:
Caolán McNamara
2016-01-21 16:30:38 +00:00
parent 42d868008d
commit a7cf2bc5fc

View File

@@ -30,6 +30,7 @@ import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import javax.swing.text.BadLocationException;
public class PlainSourceView extends JScrollPane implements
ScriptSourceView, DocumentListener {
@@ -71,7 +72,7 @@ public class PlainSourceView extends JScrollPane implements
int line = ta.getLineStartOffset(model.getCurrentPosition());
Rectangle rect = ta.modelToView(line);
ta.scrollRectToVisible(rect);
} catch (Exception e) {
} catch (BadLocationException e) {
// couldn't scroll to line, do nothing
}
@@ -238,4 +239,4 @@ class GlyphGutter extends JComponent {
g.setColor(Color.black);
g.drawPolygon(arrow);
}
}
}