--- a/jdk/src/share/classes/java/time/DayOfWeek.java Wed Oct 09 11:02:55 2013 -0400
+++ b/jdk/src/share/classes/java/time/DayOfWeek.java Thu Sep 26 15:19:27 2013 -0700
@@ -187,7 +187,12 @@
if (temporal instanceof DayOfWeek) {
return (DayOfWeek) temporal;
}
- return of(temporal.get(DAY_OF_WEEK));
+ try {
+ return of(temporal.get(DAY_OF_WEEK));
+ } catch (DateTimeException ex) {
+ throw new DateTimeException("Unable to obtain DayOfWeek from TemporalAccessor: " +
+ temporal + " of type " + temporal.getClass().getName(), ex);
+ }
}
//-----------------------------------------------------------------------