jdk/src/share/classes/java/time/DayOfWeek.java
changeset 20747 86a86a94b367
parent 19030 32f129cb6351
child 20795 8ec9e5b79828
--- 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);
+        }
     }
 
     //-----------------------------------------------------------------------