[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] FYI: MessageFormat.scanFormat() clarify exception
From: |
Mark Wielaard |
Subject: |
[cp-patches] FYI: MessageFormat.scanFormat() clarify exception |
Date: |
Fri, 10 Dec 2004 14:58:19 +0100 |
Hi,
This little patch should help when you get a exception from
messageFormat.scanFormat() by giving the actual pattern and the actual
exception that caused the IllegalArgumentException.
2004-12-07 Mark Wielaard <address@hidden>
* java/text/MessageFormat.java (scanFormat): Chain thrown exception.
Committed,
Mark
diff -u -r1.14 MessageFormat.java
--- java/text/MessageFormat.java 15 Nov 2004 14:13:26 -0000 1.14
+++ java/text/MessageFormat.java 10 Dec 2004 13:50:51 -0000
@@ -283,7 +283,9 @@
}
catch (NumberFormatException nfx)
{
- throw new IllegalArgumentException("Failed to parse integer string");
+ IllegalArgumentException iae = new IllegalArgumentException(pat);
+ iae.initCause(nfx);
+ throw iae;
}
// Extract the element format.
signature.asc
Description: This is a digitally signed message part
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] FYI: MessageFormat.scanFormat() clarify exception,
Mark Wielaard <=