String loc = adjustLocation(templateFileName);
String templateText = Utils.readFileToString(context.vertx(), loc);
INFO: Compiling Template: templates/blog2io.vertx.core.VertxException: io.vertx.core.file.FileSystemException: java.nio.file.NoSuchFileException: templates/blog2.templ at io.vertx.ext.web.impl.Utils.readFileToString(Utils.java:166) at com.deblox.web.templ.impl.DxTemplateEngineImpl.getTemplate(DxTemplateEngineImpl.java:130) at com.deblox.web.templ.impl.DxTemplateEngineImpl.render(DxTemplateEngineImpl.java:112) at io.vertx.ext.web.handler.impl.TemplateHandlerImpl.handle(TemplateHandlerImpl.java:44) at io.vertx.ext.web.handler.impl.TemplateHandlerImpl.handle(TemplateHandlerImpl.java:28) at io.vertx.ext.web.impl.RouteImpl.handleContext(RouteImpl.java:221)
try { String templateText = Utils.readFileToString(context.vertx(), loc); } catch (NoSuchFileException e) { logger.error("No such template"); } try { String templateText = Utils.readFileToString(context.vertx(), loc); } catch (VertxException e) {
if(e.cause instanceOf FileSystemException) {
logger.error("No such template");
} else {
throw e;
}
} try { templateText = Utils.readFileToString(context.vertx(), loc); } catch (VertxException e) { if (e.getCause().getCause() instanceof NoSuchFileException) { logger.error("No such template file " + loc); throw new NoSuchFileException("No such template file " + loc); } else { logger.error("Some other error " + e.getCause().getCause()); throw e; } }