How to resolve At-clause should have a non-empty description? - Checkstyle - Java

wondergoat77 picture wondergoat77 · Oct 9, 2015 · Viewed 8.9k times · Source

I am using the google java style in the checkstyle plugin for eclipse luna. Seeing this error all over my java doc but cannot seem to find how to resolve it. It's minor but its bugging me.

my javadoc:

/**
   * This is a description of something
   * 
   * @throws Exception
   */

Error is on the @throws line, Error:

At-clause should have a non-empty description

Answer

Louis Wasserman picture Louis Wasserman · Oct 9, 2015

Typically, you should write

 * @throws Exception when this exceptional condition happens

e.g.

 * @throws IllegalArgumentException when num is negative

...and generally explaining why that exception would occur.