From a7cf2bc5fc1acc4e398be1750c378b754c10924a Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 21 Jan 2016 16:30:38 +0000 Subject: coverity#1326629 DE: Dropped or ignored exception Change-Id: Ifb82c92eb0eaa019a19deee3dce375204576e2ee --- .../star/script/framework/provider/beanshell/PlainSourceView.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'scripting/java') 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 +} -- cgit