summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2006-01-13 09:56:20 +0000
committerMark Wielaard <mark@klomp.org>2006-01-13 09:56:20 +0000
commit7b2e5e9265c7eef11cc40d99273ddb72629dc743 (patch)
treedcff9c9f73e33280e48f2cc74715651899ff1302
parent69e309f580462d968156f270eaf0bba871fb5ff2 (diff)
downloadclasspath-7b2e5e9265c7eef11cc40d99273ddb72629dc743.tar.gz
* javax/swing/text/DefaultCaret.java: Chain all AssertionErrors.
-rw-r--r--ChangeLog4
-rw-r--r--javax/swing/text/DefaultCaret.java28
2 files changed, 23 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 178f905d2..05fd2ad03 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2005-01-13 Mark Wielaard <mark@klomp.org>
+ * javax/swing/text/DefaultCaret.java: Chain all AssertionErrors.
+
+2005-01-13 Mark Wielaard <mark@klomp.org>
+
* java/util/regex/Pattern.java (Pattern): Chain REException.
2006-01-13 Chris Burdess <dog@gnu.org>
diff --git a/javax/swing/text/DefaultCaret.java b/javax/swing/text/DefaultCaret.java
index 70ec57159..776ef69e5 100644
--- a/javax/swing/text/DefaultCaret.java
+++ b/javax/swing/text/DefaultCaret.java
@@ -1,5 +1,5 @@
/* DefaultCaret.java --
- Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -668,8 +668,10 @@ public class DefaultCaret extends Rectangle
}
catch (BadLocationException e)
{
- assert false : "Unexpected bad caret location: " + dot;
- return;
+ AssertionError ae;
+ ae = new AssertionError("Unexpected bad caret location: " + dot);
+ ae.initCause(e);
+ throw ae;
}
if (rect == null)
@@ -863,13 +865,17 @@ public class DefaultCaret extends Rectangle
visible = true;
Rectangle area = null;
+ int dot = getDot();
try
{
- area = getComponent().modelToView(getDot());
+ area = getComponent().modelToView(dot);
}
- catch (BadLocationException ex)
+ catch (BadLocationException e)
{
- assert false : "Unexpected bad caret location: " + getDot();
+ AssertionError ae;
+ ae = new AssertionError("Unexpected bad caret location: " + dot);
+ ae.initCause(e);
+ throw ae;
}
if (area != null)
damage(area);
@@ -902,13 +908,17 @@ public class DefaultCaret extends Rectangle
visible = v;
updateTimerStatus();
Rectangle area = null;
+ int dot = getDot();
try
{
- area = getComponent().modelToView(getDot());
+ area = getComponent().modelToView(dot);
}
- catch (BadLocationException ex)
+ catch (BadLocationException e)
{
- assert false: "Unexpected bad caret location: " + getDot();
+ AssertionError ae;
+ ae = new AssertionError("Unexpected bad caret location: " + dot);
+ ae.initCause(e);
+ throw ae;
}
if (area != null)
damage(area);