From: Simon F. <sim...@us...> - 2005-03-17 05:01:59
|
Update of /cvsroot/jcrypt/JCrypt/cs199mbc/GUI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24488/cs199mbc/GUI Modified Files: frmHelp.java frmMain.java Log Message: Added dialog starters to all caught exceptions Index: frmMain.java =================================================================== RCS file: /cvsroot/jcrypt/JCrypt/cs199mbc/GUI/frmMain.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** frmMain.java 16 Mar 2005 06:57:47 -0000 1.5 --- frmMain.java 17 Mar 2005 05:01:48 -0000 1.6 *************** *** 69,74 **** jbInit(); } catch (Exception exception) { ! // TODO: Turn into dialog ! exception.printStackTrace(); } } --- 69,77 ---- jbInit(); } catch (Exception exception) { ! JOptionPane ! .showMessageDialog( ! this, ! "Could not start the application! Make sure that you installed the program correctly.", ! "Fatal Error", JOptionPane.ERROR_MESSAGE); } } Index: frmHelp.java =================================================================== RCS file: /cvsroot/jcrypt/JCrypt/cs199mbc/GUI/frmHelp.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** frmHelp.java 17 Mar 2005 04:48:48 -0000 1.3 --- frmHelp.java 17 Mar 2005 05:01:47 -0000 1.4 *************** *** 45,50 **** this.setVisible(true); } catch (Exception exception) { ! // TODO: Turn into dialog ! exception.printStackTrace(); } } --- 45,51 ---- this.setVisible(true); } catch (Exception exception) { ! JOptionPane.showMessageDialog(this, ! "Problem displaying help! Contact the developer.", ! "Fatal Error", JOptionPane.ERROR_MESSAGE); } } *************** *** 63,71 **** p.setPage(f.toURI().toURL()); } catch (FileNotFoundException e) { ! // TODO: Turn into dialog ! e.printStackTrace(); } catch (IOException e) { ! // TODO: Turn into dialog ! e.printStackTrace(); } p.setEditable(false); --- 64,78 ---- p.setPage(f.toURI().toURL()); } catch (FileNotFoundException e) { ! JOptionPane ! .showMessageDialog( ! this, ! "Could not find the help file! Make sure that you installed the program correctly.", ! "Fatal Error", JOptionPane.ERROR_MESSAGE); } catch (IOException e) { ! JOptionPane ! .showMessageDialog( ! this, ! "Problem opening the help file! Make sure that you installed the program correctly.", ! "Fatal Error (PEBKAC)", JOptionPane.ERROR_MESSAGE); } p.setEditable(false); *************** *** 100,105 **** p.repaint(); } catch (IOException e1) { ! // TODO: Turn into dialog ! e1.printStackTrace(); } } --- 107,115 ---- p.repaint(); } catch (IOException e1) { ! JOptionPane ! .showMessageDialog( ! this, ! "Could not find the help file! Make sure that you installed the program correctly.", ! "Fatal Error", JOptionPane.ERROR_MESSAGE); } } *************** *** 114,119 **** p.validate(); } catch (IOException e1) { ! // TODO: Turn into dialog ! e1.printStackTrace(); } } --- 124,132 ---- p.validate(); } catch (IOException e1) { ! JOptionPane ! .showMessageDialog( ! this, ! "Could not find the help file! Make sure that you installed the program correctly.", ! "Fatal Error", JOptionPane.ERROR_MESSAGE); } } *************** *** 129,134 **** e1.printStackTrace(); } catch (IOException e1) { ! // TODO: Turn into dialog ! e1.printStackTrace(); } } --- 142,150 ---- e1.printStackTrace(); } catch (IOException e1) { ! JOptionPane ! .showMessageDialog( ! this, ! "Could not find the help file! Make sure that you installed the program correctly.", ! "Fatal Error", JOptionPane.ERROR_MESSAGE); } } *************** *** 163,168 **** pane.setPage(e.getURL()); } catch (Throwable t) { ! // TODO: Turn into dialog ! t.printStackTrace(); } } --- 179,187 ---- pane.setPage(e.getURL()); } catch (Throwable t) { ! JOptionPane ! .showMessageDialog( ! null, ! "Could not find the help file! Make sure that you installed the program correctly.", ! "Fatal Error", JOptionPane.ERROR_MESSAGE); } } |