Find out which exceptions a certaing class throws
When I click Ctrl+Q in IntelliJ, I do not get info on which exceptions a certain class throws. I can see this if I click Shift+F1 (view external docs) and开发者_如何学JAVA then browse the entire class.
Is there any faster way to get this info in IntelliJ?
That's pulled from the javadoc (the @throws annotation) so if it's in the javadoc for a method and you highlight a method and press control-q if it throws any exceptions, it should show you.
I think there's no easier way since the exceptions are not thrown by the class, but by its methods.
You might want to try invoking Ctrl-Shift-F7 on the "throws" keyword in a method declaration. It shows the location(s) in the method body where that exception is thrown.
Not exactly what you asked for (I think), but might come in handy.
精彩评论