From 601620b039eb72e67e14c4cfc94f6ba107d28562 Mon Sep 17 00:00:00 2001 From: PlantUML Date: Thu, 10 Mar 2022 12:26:37 +0100 Subject: [PATCH] Issue https://github.com/plantuml/plantuml/issues/948 --- src/net/sourceforge/plantuml/style/StyleLoader.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/net/sourceforge/plantuml/style/StyleLoader.java b/src/net/sourceforge/plantuml/style/StyleLoader.java index ba09fce10..1fe1e51ef 100644 --- a/src/net/sourceforge/plantuml/style/StyleLoader.java +++ b/src/net/sourceforge/plantuml/style/StyleLoader.java @@ -88,8 +88,12 @@ public class StyleLoader { InputStream internalIs = null; SFile localFile = new SFile(filename); Log.info("Trying to load style " + filename); - if (localFile.exists() == false) - localFile = FileSystem.getInstance().getFile(filename); + try { + if (localFile.exists() == false) + localFile = FileSystem.getInstance().getFile(filename); + } catch (IOException e) { + Log.info("Cannot open file. " + e); + } if (localFile.exists()) { Log.info("File found : " + localFile.getPrintablePath()); @@ -104,7 +108,6 @@ public class StyleLoader { } return internalIs; } - private void loadSkinInternal(final BlocLines lines) { for (Style newStyle : getDeclaredStyles(lines, styleBuilder)) this.styleBuilder.loadInternal(newStyle.getSignature(), newStyle);