Skip to content

Commit

Permalink
Don't throw an exception if timezones could not be built
Browse files Browse the repository at this point in the history
Signed-off-by: Taylor Smock <tsmock@meta.com>
  • Loading branch information
tsmock committed Dec 13, 2024
1 parent 4756723 commit 75ec6af
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import java.net.URI;
import java.nio.file.FileVisitResult;
import java.nio.file.Files;
import java.nio.file.NoSuchFileException;
import java.nio.file.Path;
import java.nio.file.SimpleFileVisitor;
import java.nio.file.attribute.BasicFileAttributes;
Expand Down Expand Up @@ -321,6 +322,11 @@ private void generateTimezones(Path output) {
if (!Files.exists(output)) {
try (InputStream is = runCommand(getPath("valhalla_build_timezones"))) {
Files.copy(is, output);
} catch (NoSuchFileException noSuchFileException) {
GuiHelper.runInEDT(
() -> new Notification(tr("Could not build timezones: {0}", noSuchFileException.getMessage()))
.setIcon(JOptionPane.ERROR_MESSAGE).show());
Logging.error(noSuchFileException);
} catch (IOException ioException) {
throw new UncheckedIOException(ioException);
}
Expand Down

0 comments on commit 75ec6af

Please sign in to comment.