Skip to content

Commit e98ae67

Browse files
committed
simplified the json error handling for alarmLogTable
1 parent 3ed606a commit e98ae67

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

app/alarm/logging-ui/src/main/java/org/phoebus/applications/alarm/logging/ui/AlarmLogTableController.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package org.phoebus.applications.alarm.logging.ui;
22

33
import com.fasterxml.jackson.core.JsonProcessingException;
4-
import com.fasterxml.jackson.core.JsonParseException;
54
import com.fasterxml.jackson.databind.JsonNode;
65
import com.fasterxml.jackson.databind.ObjectMapper;
76
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
@@ -259,11 +258,9 @@ protected void updateItem(String item, boolean empty) {
259258
return null;
260259
}
261260
final boolean latching = jsonNode.get("latching").asBoolean();
262-
return new SimpleStringProperty(latching ? "Latched" : "Enabled");
263-
} catch (JsonParseException e) {
264-
logger.log(Level.SEVERE, "Error parsing JSON in alarmMesssage " + e.getMessage());
261+
return new SimpleStringProperty(latching ? "Enabled:Latched" : "Enabled:Unlatch");
265262
} catch (Exception e) {
266-
logger.log(Level.SEVERE, "Unexpected error in alarmMessage" + e.getMessage());
263+
logger.log(Level.SEVERE, "Unexpected error in alarmMessage" + e);
267264
}
268265
}
269266
}

0 commit comments

Comments
 (0)