|
8 | 8 | import java.net.URISyntaxException; |
9 | 9 | import java.nio.charset.StandardCharsets; |
10 | 10 | import java.nio.file.FileSystem; |
| 11 | +import java.nio.file.FileSystemAlreadyExistsException; |
11 | 12 | import java.nio.file.FileSystems; |
12 | 13 | import java.nio.file.Files; |
13 | 14 | import java.nio.file.Path; |
@@ -173,15 +174,16 @@ private synchronized Map<String, String> loadScripts() { |
173 | 174 | } else { |
174 | 175 | return walkScriptsPath(Paths.get(uri)); |
175 | 176 | } |
176 | | - } catch (IOException e) { |
177 | | - LOGGER.warning(MessageKeys.EXCEPTION, e); |
178 | | - e.printStackTrace(); // xyz- |
179 | | - LOGGER.warning(MessageKeys.EXCEPTION, new IOException("xyz- uri is " + uri)); |
| 177 | + } catch (FileSystemAlreadyExistsException ale) { |
| 178 | + LOGGER.warning(MessageKeys.EXCEPTION, new IOException("xyz-FileSystemAlreadyExistsException uri is " + uri)); |
180 | 179 | try (FileSystem fileSystem = FileSystems.getFileSystem(uri)) { |
181 | 180 | return walkScriptsPath(fileSystem.getPath(SCRIPTS)); |
182 | | - } catch(IOException ioe) { |
| 181 | + } catch(IOException e) { |
183 | 182 | throw new RuntimeException(e); |
184 | 183 | } |
| 184 | + } catch (IOException e) { |
| 185 | + LOGGER.warning(MessageKeys.EXCEPTION, e); |
| 186 | + throw new RuntimeException(e); |
185 | 187 | } |
186 | 188 | } |
187 | 189 |
|
|
0 commit comments