diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-01-21 16:30:38 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-02-04 10:46:08 +0000 |
commit | a7cf2bc5fc1acc4e398be1750c378b754c10924a (patch) | |
tree | 15cfdb0596f95de062b1d000b027560ad88da310 /scripting/java | |
parent | 42d868008d2b4c5b31c307f02e60ba94ddcd5678 (diff) |
coverity#1326629 DE: Dropped or ignored exception
Change-Id: Ifb82c92eb0eaa019a19deee3dce375204576e2ee
Diffstat (limited to 'scripting/java')
-rw-r--r-- | scripting/java/com/sun/star/script/framework/provider/beanshell/PlainSourceView.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripting/java/com/sun/star/script/framework/provider/beanshell/PlainSourceView.java b/scripting/java/com/sun/star/script/framework/provider/beanshell/PlainSourceView.java index 945b3bc00a91..89ef8c9c38b6 100644 --- a/scripting/java/com/sun/star/script/framework/provider/beanshell/PlainSourceView.java +++ b/scripting/java/com/sun/star/script/framework/provider/beanshell/PlainSourceView.java @@ -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); } -}
\ No newline at end of file +} |