aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/traccar/notification/TextTemplateFormatter.java15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/main/java/org/traccar/notification/TextTemplateFormatter.java b/src/main/java/org/traccar/notification/TextTemplateFormatter.java
index ab90d76d4..cc6935982 100644
--- a/src/main/java/org/traccar/notification/TextTemplateFormatter.java
+++ b/src/main/java/org/traccar/notification/TextTemplateFormatter.java
@@ -75,19 +75,8 @@ public class TextTemplateFormatter {
}
public Template getTemplate(String name, String path) {
-
- String templateFilePath;
- Template template;
-
- try {
- templateFilePath = Paths.get(path, name + ".vm").toString();
- template = velocityEngine.getTemplate(templateFilePath, StandardCharsets.UTF_8.name());
- } catch (ResourceNotFoundException error) {
- LOGGER.warn("Notification template error", error);
- templateFilePath = Paths.get(path, "unknown.vm").toString();
- template = velocityEngine.getTemplate(templateFilePath, StandardCharsets.UTF_8.name());
- }
- return template;
+ String templateFilePath = Paths.get(path, name + ".vm").toString();
+ return velocityEngine.getTemplate(templateFilePath, StandardCharsets.UTF_8.name());
}
public NotificationMessage formatMessage(VelocityContext velocityContext, String name, String templatePath) {