Skip to content

Commit 35c830f

Browse files
committed
Better logging messages
1 parent f66d9fb commit 35c830f

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

sdk/tools/consumer-test-tool/src/main/java/esa/mo/nmf/ctt/guis/ConsumerTestToolGUI.java

-8
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,6 @@ private void initComponents() {
140140
tabs = new javax.swing.JTabbedPane();
141141

142142
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
143-
addWindowListener(new java.awt.event.WindowAdapter() {
144-
@Override
145-
public void windowClosing(java.awt.event.WindowEvent e) {
146-
// call dispose here, so on panels the removeNotify is also called
147-
// to clean up the connections
148-
e.getWindow().dispose();
149-
}
150-
});
151143
setMinimumSize(new java.awt.Dimension(800, 600));
152144
setName("Form"); // NOI18N
153145
setPreferredSize(new java.awt.Dimension(1100, 600));

sdk/tools/consumer-test-tool/src/main/java/esa/mo/nmf/ctt/services/mc/ActionConsumerPanel.java

+9-3
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,11 @@ private void submitActionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-
241241
}
242242

243243
try {
244-
gma.launchAction(actionTable.getSelectedDefinitionObjId(), argumentValueList, new ActionAdapter() {
244+
Long definitionObjId = actionTable.getSelectedDefinitionObjId();
245+
Logger.getLogger(ActionConsumerPanel.class.getName()).log(Level.INFO,
246+
"Triggering action with id: " + definitionObjId);
247+
248+
gma.launchAction(definitionObjId, argumentValueList, new ActionAdapter() {
245249
@Override
246250
public void submitActionAckReceived(MALMessageHeader msgHeader, Map qosProperties) {
247251
super.submitActionAckReceived(msgHeader, qosProperties);
@@ -251,10 +255,12 @@ public void submitActionAckReceived(MALMessageHeader msgHeader, Map qosPropertie
251255
@Override
252256
public void submitActionErrorReceived(MALMessageHeader msgHeader, MALStandardError error, Map qosProperties) {
253257
super.submitActionErrorReceived(msgHeader, error, qosProperties);
254-
JOptionPane.showMessageDialog(null, "The action submittal has failed.", "Error", JOptionPane.PLAIN_MESSAGE);
258+
JOptionPane.showMessageDialog(
259+
null,
260+
"The submitted action failed: " + error.toString(),
261+
"Error", JOptionPane.PLAIN_MESSAGE);
255262
}
256263
});
257-
258264
} catch (NMFException ex) {
259265
JOptionPane.showMessageDialog(null, "There was an error with the submitted action.", "Error", JOptionPane.PLAIN_MESSAGE);
260266
Logger.getLogger(ActionConsumerPanel.class.getName()).log(Level.SEVERE, null, ex);

0 commit comments

Comments
 (0)