jdk/src/share/classes/java/time/OffsetDateTime.java
changeset 20747 86a86a94b367
parent 20520 0952771e3e25
child 20795 8ec9e5b79828
--- a/jdk/src/share/classes/java/time/OffsetDateTime.java	Wed Oct 09 11:02:55 2013 -0400
+++ b/jdk/src/share/classes/java/time/OffsetDateTime.java	Thu Sep 26 15:19:27 2013 -0700
@@ -347,8 +347,8 @@
         if (temporal instanceof OffsetDateTime) {
             return (OffsetDateTime) temporal;
         }
-        ZoneOffset offset = ZoneOffset.from(temporal);
         try {
+            ZoneOffset offset = ZoneOffset.from(temporal);
             try {
                 LocalDateTime ldt = LocalDateTime.from(temporal);
                 return OffsetDateTime.of(ldt, offset);
@@ -357,7 +357,8 @@
                 return OffsetDateTime.ofInstant(instant, offset);
             }
         } catch (DateTimeException ex) {
-            throw new DateTimeException("Unable to obtain OffsetDateTime from TemporalAccessor: " + temporal.getClass(), ex);
+            throw new DateTimeException("Unable to obtain OffsetDateTime from TemporalAccessor: " +
+                    temporal + " of type " + temporal.getClass().getName(), ex);
         }
     }