I am trying to add a JavaDoc in my code. I need to add multiple exception in a single throw. When I add below, it only recognizes NullPointerException
not the IllegalArgumentException
. Is there any way to provide multiple exception in a single throw tag so that it can recognize both, when I place my mouse on the method?
@throws NullPointerException, IllegalArgumentException when invalid userId, timeout is passed
Or I need to do it like this? By this, I am repeating same comment twice.
@throws NullPointerException when invalid userId, timeout is passed
@throws IllegalArgumentException when invalid userId, timeout is passed
You cannot specify 2 exceptions with 1 @throws
tag
You need a @throws
tag for each exception you have. This allows you to give a description for each exception you are throwing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With