public void actionPerformed(ActionEvent ae) { String name = (String) JOptionPane.showInputDialog(UIUtils.getActionEventParentWindow(ae), "Name for the new processor?", "Name required", JOptionPane.QUESTION_MESSAGE, null, null, ""); if (name != null) { try { pf.createProcessor(name, ScavengerTreePopupHandler.this.scavenger.model); } catch (ProcessorCreationException pce) { JOptionPane.showMessageDialog(null, "Processor creation exception : \n" + pce.getMessage(), "Exception!", JOptionPane.ERROR_MESSAGE); } catch (DuplicateProcessorNameException dpne) { JOptionPane.showMessageDialog(null, "Duplicate name : \n" + dpne.getMessage(), "Exception!", JOptionPane.ERROR_MESSAGE); } } } });
public void actionPerformed(ActionEvent ae) { String defaultName = pf.getName(); String validName = ScavengerTreePopupHandler.this.scavenger.model .getValidProcessorName(defaultName); try { pf.createProcessor(validName, ScavengerTreePopupHandler.this.scavenger.model); } catch (ProcessorCreationException pce) { logger.error("Problem creating processor", pce); JOptionPane.showMessageDialog(null, "Processor creation exception : \n" + pce.getMessage(), "Exception!", JOptionPane.ERROR_MESSAGE); } catch (DuplicateProcessorNameException dpne) { logger.error("Problem creating processor", dpne); JOptionPane.showMessageDialog(null, "Duplicate name : \n" + dpne.getMessage(), "Exception!", JOptionPane.ERROR_MESSAGE); } } });
System.out.println("Cannot read 2" + e.getMessage()); } catch (ProcessorCreationException e) { System.out.println("Cannot read 3 " + e.getMessage()); } catch (DataConstraintCreationException e) { System.out.println("Cannot read 4" + e.getMessage());
System.out.println("Cannot read 2" + e.getMessage()); } catch (ProcessorCreationException e) { System.out.println("Cannot read 3 " + e.getMessage()); } catch (DataConstraintCreationException e) { System.out.println("Cannot read 4" + e.getMessage());
JOptionPane.showMessageDialog(null, "Processor creation exception : \n" + pce.getMessage(), "Exception!", JOptionPane.ERROR_MESSAGE); return;