[kaffe] CVS kaffe (robilad): improved exception messages for Thread.sleep()
Kaffe CVS
cvs-commits at kaffe.org
Thu Feb 10 14:52:26 PST 2005
PatchSet 5513
Date: 2005/02/10 22:46:41
Author: robilad
Branch: HEAD
Tag: (none)
Log:
improved exception messages for Thread.sleep()
2005-02-10 Dalibor Topic <robilad at kaffe.org>
* libraries/javalib/java/lang/Thread.java (sleep): Improved
exception messages.
Members:
ChangeLog:1.3557->1.3558
libraries/javalib/java/lang/Thread.java:1.53->1.54
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3557 kaffe/ChangeLog:1.3558
--- kaffe/ChangeLog:1.3557 Thu Feb 10 22:41:25 2005
+++ kaffe/ChangeLog Thu Feb 10 22:46:41 2005
@@ -1,5 +1,10 @@
2005-02-10 Dalibor Topic <robilad at kaffe.org>
+ * libraries/javalib/java/lang/Thread.java (sleep): Improved
+ exception messages.
+
+2005-02-10 Dalibor Topic <robilad at kaffe.org>
+
* libraries/javalib/java/lang/Class.java (newInstance):
Improved exception messages.
Index: kaffe/libraries/javalib/java/lang/Thread.java
diff -u kaffe/libraries/javalib/java/lang/Thread.java:1.53 kaffe/libraries/javalib/java/lang/Thread.java:1.54
--- kaffe/libraries/javalib/java/lang/Thread.java:1.53 Thu Jan 6 19:08:22 2005
+++ kaffe/libraries/javalib/java/lang/Thread.java Thu Feb 10 22:46:46 2005
@@ -805,8 +805,11 @@
{
// Check parameters
- if (ms < 0 || ns < 0 || ns > 999999)
- throw new IllegalArgumentException();
+ if (ms < 0 )
+ throw new IllegalArgumentException("Negative milliseconds: " + ms);
+
+ if (ns < 0 || ns > 999999)
+ throw new IllegalArgumentException("Nanoseconds ouf of range: " + ns);
// Really sleep
VMThread.sleep(ms, ns);
More information about the kaffe
mailing list