mirror of
https://github.com/PAMGuard/PAMGuard.git
synced 2024-11-21 22:52:22 +00:00
Small error handling
This commit is contained in:
parent
2e29e9cd95
commit
c3edae516b
@ -603,17 +603,17 @@ public class PamGui extends PamView implements WindowListener, PamSettings {
|
|||||||
fileMenu.add(menuItem);
|
fileMenu.add(menuItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SMRUEnable.isEnable()) {
|
// if (SMRUEnable.isEnable()) {
|
||||||
menuItem = new JMenuItem("Import PAMGuard Modules");
|
menuItem = new JMenuItem("Import PAMGuard Modules");
|
||||||
menuItem.setToolTipText("Import module settings from a different PAMGuard configuration (psfx files only");
|
menuItem.setToolTipText("Import module settings from a different PAMGuard configuration (psfx files only");
|
||||||
menuItem.addActionListener(new ActionListener() {
|
menuItem.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
importSettings();
|
importSettings();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
fileMenu.add(menuItem);
|
fileMenu.add(menuItem);
|
||||||
}
|
// }
|
||||||
|
|
||||||
fileMenu.addSeparator();
|
fileMenu.addSeparator();
|
||||||
|
|
||||||
|
@ -92,11 +92,17 @@ public class PamguardMetaData implements Serializable {
|
|||||||
* @return the deploymentWrapper
|
* @return the deploymentWrapper
|
||||||
*/
|
*/
|
||||||
public NilusSettingsWrapper<Deployment> getDeploymentWrapper() {
|
public NilusSettingsWrapper<Deployment> getDeploymentWrapper() {
|
||||||
|
if (deploymentWrapper == null) {
|
||||||
|
deploymentWrapper = new NilusSettingsWrapper<>();
|
||||||
|
}
|
||||||
return deploymentWrapper;
|
return deploymentWrapper;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void checkSerialisation() {
|
public void checkSerialisation() {
|
||||||
// check that all wrappers have their xml up to date.
|
// check that all wrappers have their xml up to date.
|
||||||
|
if (deploymentWrapper == null) {
|
||||||
|
deploymentWrapper = new NilusSettingsWrapper<>();
|
||||||
|
}
|
||||||
deploymentWrapper.reSerialise();
|
deploymentWrapper.reSerialise();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ public class DBXMLQueries {
|
|||||||
result = queries.QueryTethys(xQuery);
|
result = queries.QueryTethys(xQuery);
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
e.printStackTrace();
|
// e.printStackTrace();
|
||||||
}
|
}
|
||||||
if (result == null) {
|
if (result == null) {
|
||||||
return null;
|
return null;
|
||||||
|
@ -74,7 +74,7 @@ public class NilusSettingsWrapper<T extends Object> implements Serializable, Clo
|
|||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Set the nilus object. This marshals the nilus object
|
* Set the nilus object. This marshals the nilus object
|
||||||
* into xml and saves the data as an intetnal xml string which
|
* into xml and saves the data as an internal xml string which
|
||||||
* can be safely serialized.
|
* can be safely serialized.
|
||||||
* @param nilusObject nilus object.
|
* @param nilusObject nilus object.
|
||||||
* @return true if it was marshalled OK.
|
* @return true if it was marshalled OK.
|
||||||
|
Loading…
Reference in New Issue
Block a user