Skip to content

Documentation Comments Style Guide - Guidelines Which Exceptions to Document #19927

@gianmarcoschifone

Description

@gianmarcoschifone

Parent issue: #19807

Coverage table

Chapter link

Content

Image

Image

Text

Guidelines - Which Exceptions to Document

Document the following exceptions with the @throws tag:

  • All checked exceptions.
    (These must be declared in the throws clause.)
  • Those unchecked exceptions that the caller might reasonably want to catch.
    (It is considered poor programming practice to include unchecked exceptions in the throws clause.)
    Documenting these in the @throws tag is up to the judgment of the API designer, as described below.

Guidelines

Document the following exceptions with the @throws tag:

  • All checked exceptions

This chapter is covered by JavadocMethod, using its property validateThrows. Proposal:

Documentation Comments Rule Checkstyle Checks Used Sample files
Guidelines - Which Exceptions to Document blue✅JavadocMethod
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions