Skip to content

Commit

Permalink
Better logging messages
Browse files Browse the repository at this point in the history
  • Loading branch information
CesarCoelho committed Oct 7, 2022
1 parent f66d9fb commit 35c830f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,6 @@ private void initComponents() {
tabs = new javax.swing.JTabbedPane();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
addWindowListener(new java.awt.event.WindowAdapter() {
@Override
public void windowClosing(java.awt.event.WindowEvent e) {
// call dispose here, so on panels the removeNotify is also called
// to clean up the connections
e.getWindow().dispose();
}
});
setMinimumSize(new java.awt.Dimension(800, 600));
setName("Form"); // NOI18N
setPreferredSize(new java.awt.Dimension(1100, 600));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,11 @@ private void submitActionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-
}

try {
gma.launchAction(actionTable.getSelectedDefinitionObjId(), argumentValueList, new ActionAdapter() {
Long definitionObjId = actionTable.getSelectedDefinitionObjId();
Logger.getLogger(ActionConsumerPanel.class.getName()).log(Level.INFO,
"Triggering action with id: " + definitionObjId);

gma.launchAction(definitionObjId, argumentValueList, new ActionAdapter() {
@Override
public void submitActionAckReceived(MALMessageHeader msgHeader, Map qosProperties) {
super.submitActionAckReceived(msgHeader, qosProperties);
Expand All @@ -251,10 +255,12 @@ public void submitActionAckReceived(MALMessageHeader msgHeader, Map qosPropertie
@Override
public void submitActionErrorReceived(MALMessageHeader msgHeader, MALStandardError error, Map qosProperties) {
super.submitActionErrorReceived(msgHeader, error, qosProperties);
JOptionPane.showMessageDialog(null, "The action submittal has failed.", "Error", JOptionPane.PLAIN_MESSAGE);
JOptionPane.showMessageDialog(
null,
"The submitted action failed: " + error.toString(),
"Error", JOptionPane.PLAIN_MESSAGE);
}
});

} catch (NMFException ex) {
JOptionPane.showMessageDialog(null, "There was an error with the submitted action.", "Error", JOptionPane.PLAIN_MESSAGE);
Logger.getLogger(ActionConsumerPanel.class.getName()).log(Level.SEVERE, null, ex);
Expand Down

0 comments on commit 35c830f

Please sign in to comment.