Issue#27 removed getCause management
This commit is contained in:
parent
3390335269
commit
f3bcf8e9f7
|
@ -177,10 +177,6 @@ public class SibaCLI
|
||||||
{
|
{
|
||||||
System.err.println("SibaException = " + exception.getMessage());
|
System.err.println("SibaException = " + exception.getMessage());
|
||||||
logger.error(exception.getMessage(), exception);
|
logger.error(exception.getMessage(), exception);
|
||||||
if (exception.getCause() != null)
|
|
||||||
{
|
|
||||||
logger.error("SibaException chainée = " + exception.getCause().getMessage());
|
|
||||||
}
|
|
||||||
help();
|
help();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,7 +63,7 @@ public class BackupPanel extends JPanel
|
||||||
*/
|
*/
|
||||||
public BackupPanel() throws SibaException
|
public BackupPanel() throws SibaException
|
||||||
{
|
{
|
||||||
|
|
||||||
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
|
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
|
||||||
setLayout(new BorderLayout(0, 0));
|
setLayout(new BorderLayout(0, 0));
|
||||||
|
|
||||||
|
@ -109,16 +109,16 @@ public class BackupPanel extends JPanel
|
||||||
|
|
||||||
});
|
});
|
||||||
choosePanel.add(btnNewButton, "6, 2");
|
choosePanel.add(btnNewButton, "6, 2");
|
||||||
|
|
||||||
JLabel lblTargetDirectory = new JLabel(BUNDLE.getString("BackupPanel.lblTargetDirectory.text")); //$NON-NLS-1$
|
JLabel lblTargetDirectory = new JLabel(BUNDLE.getString("BackupPanel.lblTargetDirectory.text")); //$NON-NLS-1$
|
||||||
choosePanel.add(lblTargetDirectory, "2, 4");
|
choosePanel.add(lblTargetDirectory, "2, 4");
|
||||||
lblTargetDirectory.setVerticalAlignment(SwingConstants.TOP);
|
lblTargetDirectory.setVerticalAlignment(SwingConstants.TOP);
|
||||||
lblTargetDirectory.setHorizontalAlignment(SwingConstants.LEFT);
|
lblTargetDirectory.setHorizontalAlignment(SwingConstants.LEFT);
|
||||||
|
|
||||||
this.targetDirectoryField = new JTextField();
|
this.targetDirectoryField = new JTextField();
|
||||||
choosePanel.add(this.targetDirectoryField, "4, 4");
|
choosePanel.add(this.targetDirectoryField, "4, 4");
|
||||||
this.targetDirectoryField.setColumns(10);
|
this.targetDirectoryField.setColumns(10);
|
||||||
|
|
||||||
JButton btnNewButton_1 = new JButton(BUNDLE.getString("BackupPanel.btnNewButton_1.text")); //$NON-NLS-1$
|
JButton btnNewButton_1 = new JButton(BUNDLE.getString("BackupPanel.btnNewButton_1.text")); //$NON-NLS-1$
|
||||||
btnNewButton_1.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
|
btnNewButton_1.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
|
||||||
btnNewButton_1.addActionListener(new ActionListener()
|
btnNewButton_1.addActionListener(new ActionListener()
|
||||||
|
@ -126,21 +126,21 @@ public class BackupPanel extends JPanel
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(final ActionEvent e)
|
public void actionPerformed(final ActionEvent e)
|
||||||
{
|
{
|
||||||
|
|
||||||
File file = TargetDirectorySelector.showSelectorDialog(BackupPanel.this, null);
|
File file = TargetDirectorySelector.showSelectorDialog(BackupPanel.this, null);
|
||||||
if (file != null)
|
if (file != null)
|
||||||
{
|
{
|
||||||
BackupPanel.this.targetDirectoryField.setText(file.getPath());
|
BackupPanel.this.targetDirectoryField.setText(file.getPath());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
choosePanel.add(btnNewButton_1, "6, 4");
|
choosePanel.add(btnNewButton_1, "6, 4");
|
||||||
|
|
||||||
btnNewButton_1.setHorizontalAlignment(SwingConstants.RIGHT);
|
btnNewButton_1.setHorizontalAlignment(SwingConstants.RIGHT);
|
||||||
|
|
||||||
JPanel actionPanel = new JPanel();
|
JPanel actionPanel = new JPanel();
|
||||||
|
|
||||||
add(actionPanel, BorderLayout.SOUTH);
|
add(actionPanel, BorderLayout.SOUTH);
|
||||||
actionPanel.setLayout(new BoxLayout(actionPanel, BoxLayout.Y_AXIS));
|
actionPanel.setLayout(new BoxLayout(actionPanel, BoxLayout.Y_AXIS));
|
||||||
|
|
||||||
|
@ -187,16 +187,12 @@ public class BackupPanel extends JPanel
|
||||||
String titleWarning = BUNDLE.getString("BackupPanel.TitleWarning.text");
|
String titleWarning = BUNDLE.getString("BackupPanel.TitleWarning.text");
|
||||||
JOptionPane.showMessageDialog(BackupPanel.this, dataMissing, titleWarning,
|
JOptionPane.showMessageDialog(BackupPanel.this, dataMissing, titleWarning,
|
||||||
JOptionPane.INFORMATION_MESSAGE);
|
JOptionPane.INFORMATION_MESSAGE);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (SibaException exception)
|
catch (SibaException exception)
|
||||||
{
|
{
|
||||||
String dataMissing = exception.getMessage();
|
String dataMissing = exception.getMessage();
|
||||||
if (exception.getCause() != null)
|
|
||||||
{
|
|
||||||
dataMissing = dataMissing.concat(exception.getCause().getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
String titleWarning = BUNDLE.getString("BackupPanel.TitleWarning.text");
|
String titleWarning = BUNDLE.getString("BackupPanel.TitleWarning.text");
|
||||||
JOptionPane.showMessageDialog(BackupPanel.this, dataMissing, titleWarning,
|
JOptionPane.showMessageDialog(BackupPanel.this, dataMissing, titleWarning,
|
||||||
|
|
|
@ -315,10 +315,6 @@ public class SibaGUI
|
||||||
{
|
{
|
||||||
logger.error("SibaException ", exception);
|
logger.error("SibaException ", exception);
|
||||||
String dataMissing = exception.getMessage();
|
String dataMissing = exception.getMessage();
|
||||||
if (exception.getCause() != null)
|
|
||||||
{
|
|
||||||
logger.info("SibaException chainée = " + exception.getCause().getMessage());
|
|
||||||
}
|
|
||||||
String titleWarning = BUNDLE.getString("BackupPanel.TitleWarning.text");
|
String titleWarning = BUNDLE.getString("BackupPanel.TitleWarning.text");
|
||||||
JOptionPane.showMessageDialog(null, dataMissing, titleWarning, JOptionPane.INFORMATION_MESSAGE);
|
JOptionPane.showMessageDialog(null, dataMissing, titleWarning, JOptionPane.INFORMATION_MESSAGE);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue