Changeset 19216 in josm
- Timestamp:
- 2024-09-09T19:25:48+02:00 (2 months ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/ExceptionDialogUtil.java
r18802 r19216 10 10 import java.net.SocketException; 11 11 import java.net.UnknownHostException; 12 import java.nio.file.FileSystemException; 12 13 import java.util.regex.Matcher; 13 14 import java.util.regex.Pattern; … … 142 143 ht("/ErrorMessages#NestedIOException") 143 144 ); 145 } 146 147 /** 148 * Explains a {@link IOException} 149 * 150 * @param e the exception 151 */ 152 private static void explainIOException(Exception e) { 153 if (e instanceof FileSystemException && e.getMessage().contains("The device is not ready")) { 154 showErrorDialog(ExceptionUtil.explainException(e), tr("File System Exception"), null); 155 } else { 156 explainGeneric(e); 157 } 144 158 } 145 159 … … 493 507 return; 494 508 } 509 FileSystemException fileSystemException = ExceptionUtil.getNestedException(e, FileSystemException.class); 510 if (fileSystemException != null) { 511 explainIOException(fileSystemException); 512 return; 513 } 495 514 explainGeneric(e); 496 515 } -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImagesLoader.java
r18248 r19216 6 6 import java.io.File; 7 7 import java.io.IOException; 8 import java.io.UncheckedIOException; 8 9 import java.util.ArrayList; 9 10 import java.util.Arrays; … … 91 92 92 93 ImageEntry e = new ImageEntry(f); 93 e.extractExif(); 94 try { 95 e.extractExif(); 96 } catch (UncheckedIOException uncheckedIOException) { 97 // We want to throw the actual IOException that is wrapped, not the unchecked IO exception. 98 // See #23866 99 Logging.trace(uncheckedIOException); 100 throw uncheckedIOException.getCause(); 101 } 94 102 File parentFile = f.getParentFile(); 95 103 entries.computeIfAbsent(parentFile != null ? parentFile.getName() : "", x -> new ArrayList<>()).add(e);
Note:
See TracChangeset
for help on using the changeset viewer.