diff -r 1687adb2b7f0 -r fba31e9504a1 samples/exceptions/src/org/apidesign/exceptions/trycatchredo/SaveActionWithQuery.java --- a/samples/exceptions/src/org/apidesign/exceptions/trycatchredo/SaveActionWithQuery.java Sun Feb 01 13:38:08 2009 +0100 +++ b/samples/exceptions/src/org/apidesign/exceptions/trycatchredo/SaveActionWithQuery.java Sun Feb 01 16:03:37 2009 +0100 @@ -35,7 +35,12 @@ JDialog d = p.createDialog(ex.getLocalizedMessage()); d.setVisible(true); ex.confirm(p.getValue()); - continue; + if ( + !p.getValue().equals(JOptionPane.CANCEL_OPTION) && + !p.getValue().equals(JOptionPane.CLOSED_OPTION) + ) { + continue; + } } catch (IOException ex) { JOptionPane.showMessageDialog(null, ex); }