javacheckstylegoogle-style-guide

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


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

Solution

  • 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.