From eb2ee980e5b5127e56f5b819350ae4174bd0433e Mon Sep 17 00:00:00 2001 From: Erik Forkalsrud Date: Sun, 3 May 2009 14:12:27 -0700 Subject: [PATCH] include filename in exception --- src/org/forkalsrud/album/exif/DirectoryEntry.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/org/forkalsrud/album/exif/DirectoryEntry.java b/src/org/forkalsrud/album/exif/DirectoryEntry.java index 3c4d38c..b27d1d8 100644 --- a/src/org/forkalsrud/album/exif/DirectoryEntry.java +++ b/src/org/forkalsrud/album/exif/DirectoryEntry.java @@ -194,9 +194,6 @@ public class DirectoryEntry extends Entry { Metadata metadata; try { metadata = JpegMetadataReader.readMetadata(f); - } catch (Exception e) { - throw new RuntimeException("problem reading file " + f.getPath(), e); - } Directory exifDirectory = metadata.getDirectory(ExifDirectory.class); if (exifDirectory.containsTag(ExifDirectory.TAG_ORIENTATION)) { int orientation = exifDirectory.getInt(ExifDirectory.TAG_ORIENTATION); @@ -227,6 +224,9 @@ public class DirectoryEntry extends Entry { props.setProperty(base + "dimensions", new Dimension(width, height).toString()); hasDim = true; } + } catch (Exception e) { + throw new RuntimeException("problem reading file " + f.getPath(), e); + } props.setProperty(base + "etag", Integer.toHexString(name.hashCode() + Long.valueOf(f.lastModified()).hashCode())); if (!hasDate) { props.setProperty(base + "captureDate", sdf.format(new Date(f.lastModified())));