@Override public Reader getReader(String resourceName) { Reader reader = mustacheResolver.getReader(resourceName); if (reader == null) { throw new MustacheNotFoundException(resourceName); } return reader; }
@Test public void testMustacheNotFoundException() { String nonExistingMustache = "404"; try { MustacheFactory c = new FallbackMustacheFactory(rootOverride, rootDefault); c.compile(nonExistingMustache); fail("Didn't throw an exception"); } catch (MustacheNotFoundException e) { assertEquals(nonExistingMustache, e.getName()); } }
public void testMustacheNotFoundException() { String nonExistingMustache = "404"; try { new DefaultMustacheFactory().compile(nonExistingMustache); fail("Didn't throw an exception"); } catch (MustacheNotFoundException e) { assertEquals(nonExistingMustache, e.getName()); } }
public Mustache compile(String file) { Reader reader = mf.getReader(file); if (reader == null) { throw new MustacheNotFoundException(file); } return compile(reader, file); }
throw new MustacheNotFoundException(resourceName); } else { return new BufferedReader(new InputStreamReader(is, StandardCharsets.UTF_8)); throw new MustacheNotFoundException(resourceName, lastException);
@Override public Reader getReader(String resourceName) { Reader reader = mustacheResolver.getReader(resourceName); if (reader == null) { throw new MustacheNotFoundException(resourceName); } return reader; }
@Override public Reader getReader(String resourceName) { Reader reader = mustacheResolver.getReader(resourceName); if (reader == null) { throw new MustacheNotFoundException(resourceName); } return reader; }
throw new MustacheNotFoundException(resourceName); } else { return new BufferedReader(new InputStreamReader(is, StandardCharsets.UTF_8)); throw new MustacheNotFoundException(resourceName, lastException);
public Mustache compile(String file) { Reader reader = mf.getReader(file); if (reader == null) { throw new MustacheNotFoundException(file); } return compile(reader, file); }
public Mustache compile(String file) { Reader reader = mf.getReader(file); if (reader == null) { throw new MustacheNotFoundException(file); } return compile(reader, file); }
throw new MustacheNotFoundException(resourceName); } else { return new BufferedReader(new InputStreamReader(is, "UTF-8")); throw new MustacheNotFoundException(resourceName, lastException);