package test190623; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.IOException; import java.util.logging.Level; import java.util.logging.Logger; import org.openide.awt.ActionRegistration; import org.openide.awt.ActionReference; import org.openide.awt.ActionID; import org.openide.util.RequestProcessor; @ActionID(category="Build", id="test190623.BreakAction") @ActionRegistration(displayName="Throw an Exception!") @ActionReference(path="Menu/Help", position=100, separatorAfter=150) public final class BreakAction implements ActionListener { public @Override void actionPerformed(ActionEvent e) { a(); RequestProcessor.getDefault().post(new Runnable() { public @Override void run() { a(); } }); } void a() { b(); } void b() { try { c(); } catch (IOException x) { Logger.getLogger(BreakAction.class.getName()).log(Level.INFO, null, x); } } void c() throws IOException { d(); } void d() throws IOException { throw new IOException("problem"); } }