aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2024-02-24 17:23:39 -0800
committerAnton Tananaev <anton@traccar.org>2024-02-24 17:23:39 -0800
commitb37c5aa05bdd903af998435e073638f42ae9e8d1 (patch)
treefbde716bb11f5ff5ce636b45850696d0ec7f5f91 /src
parent77b3f9f4b05dfc44809b578eaae55645f496b65c (diff)
downloadtrackermap-server-b37c5aa05bdd903af998435e073638f42ae9e8d1.tar.gz
trackermap-server-b37c5aa05bdd903af998435e073638f42ae9e8d1.tar.bz2
trackermap-server-b37c5aa05bdd903af998435e073638f42ae9e8d1.zip
Remove unknown template
Diffstat (limited to 'src')
-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) {