Wrap with try / catch

Is there a way to get idea to wrap a try catch around a block of code? The code throws a RuntimeException so I don't have to catch it but I want to. Here is an example

Toolkit.getDefaultToolkit().addAWTEventListener(listener , AWTEvent.MOUSE_EVENT_MASK );

this can throw an AccessControlException. Is there a way to get intellij to wrap that for me?

1 comment
Comment actions Permalink

Surround-with -> try, catch

Control-alt-t, 6


Please sign in to leave a comment.