From c99e96955ed0c7ea1eb8c8cfabddc39cfc434e6a Mon Sep 17 00:00:00 2001 From: jprocter Date: Wed, 23 May 2012 20:15:39 +0100 Subject: [PATCH] JAL-1067 report any warning messages to user --- src/jalview/gui/AlignFrame.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 198c3bd..e19581f 100755 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -3958,7 +3958,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, AlignmentI aln; if( (aln=viewport.getAlignment()) != null && (aln.getHeight() != result.getHeight() || aln.getWidth() != result.getWidth()) ) { // TODO: raise a dialog box here rather than bomb out. - throw new RuntimeException("The scores matrix does not match the alignment dimensions"); + JOptionPane.showMessageDialog(Desktop.desktop, "The scores matrix does not match the alignment dimensions", + "Problem reading T-COFFEE score file", JOptionPane.WARNING_MESSAGE); } if (result.annotateAlignment(alignPanel.getAlignment(), true)) { @@ -3970,12 +3971,16 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, tcoffeeColour.setEnabled(false); tcoffeeColour.setSelected(false); } + if (result.getWarningMessage()!=null) + { + JOptionPane.showMessageDialog(Desktop.desktop, result.getWarningMessage(),"Problem reading T-COFEEE score file", JOptionPane.WARNING_MESSAGE); + } } catch (Exception ex) { JOptionPane.showMessageDialog( Desktop.desktop, ex.getMessage(), - "Problem reading tree file", + "unexpected problem reading T-COFFEE score file", JOptionPane.WARNING_MESSAGE); ex.printStackTrace(); -- 1.7.10.2