X-Git-Url: http://git.nikiroo.be/?p=nikiroo-utils.git;a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Fsupported%2FHtml.java;h=8dec5f75d55eac093a8808df1a5023da81251dc0;hp=fffbcd7f0ad6507ccb026f7fd49fcc83aa987b1a;hb=0ffa47548f474c1330d8d723300d9aa7a4894736;hpb=ecfb936ef1c22ff75a55d8fc80e9daf767a55f34 diff --git a/src/be/nikiroo/fanfix/supported/Html.java b/src/be/nikiroo/fanfix/supported/Html.java index fffbcd7..8dec5f7 100644 --- a/src/be/nikiroo/fanfix/supported/Html.java +++ b/src/be/nikiroo/fanfix/supported/Html.java @@ -6,6 +6,8 @@ import java.net.MalformedURLException; import java.net.URISyntaxException; import java.net.URL; +import be.nikiroo.fanfix.Instance; + /** * Support class for HTML files created with this program (as we need some * metadata available in those we create). @@ -34,17 +36,17 @@ class Html extends InfoText { } @Override - public URL getCanonicalUrl(URL source) throws IOException { + public URL getCanonicalUrl(URL source) { if (source.toString().endsWith(File.separator + "index.html")) { try { File fakeFile = new File(source.toURI()); // "story/index.html" fakeFile = new File(fakeFile.getParent()); // "story" fakeFile = new File(fakeFile, fakeFile.getName()); // "story/story" return fakeFile.toURI().toURL(); - } catch (URISyntaxException e) { - throw new IOException( - "file not supported (maybe not created with this program or corrupt)", - e); + } catch (Exception e) { + Instance.getTraceHandler().error( + new IOException("Cannot find the right URL for " + + source, e)); } }