Skip to content

[FEATURE] Support the @throws documentation keyword #450

Closed

Description

@Chowarmaan
Overview of the issue

The current compodoc version does not support documenting the @throws option to include this information in the documentation after the returns, or elsewhere in the documentation block. Some functions may return data (which is documented) but might also throw a number of exceptions. This additional information would be useful in the source code documentation.

Operating System, Node.js, npm, compodoc version(s)

Windows 10
Node 9.3.0
npm 5.6.0
compodoc 1.0.5

Angular configuration, a package.json file in the root folder
Compodoc installed globally or locally ?

local installation

Motivation for or Use Case

Have the additional information of catchable exceptions that may be thrown by a function or other method would be useful in the developer documentation that is generated by Compodoc.

Reproduce the error
   /**
 * Add the JSON formatted data record
 * @param JSONData Actual JSON data record to save
     * @returns string Key Field reference that was created
 * @throws RecordAlreadyExists The record exists
     * @throws NoData JSONData was empty
 */
AddDataRecord(JSONData:any ):boolean {
	if (JSONData === null ) {
		throw new Error(NoData);
	}
            if (AddRecord(JSONData) == -1) {
                    throw new Error(RecordAlreadyExists);
	}
            return true;
}
Related issues
Suggest a Fix

Activity

  1. changed the title [-]Support the @throws documentation keyword[/-] [+][FEATURE] Support the @throws documentation keyword[/+] on Jan 26, 2018
  2. modified the milestones: 1.0.7, 1.0.8 on Feb 11, 2018
  3. modified the milestones: 1.0.8, 1.0.9, 1.0.10, 1.1.1 on Mar 1, 2018
  4. modified the milestones: 1.1.1, 1.1.2 on Mar 30, 2018
  5. removed this from the 1.1.2 milestone on Apr 8, 2018
  6. 8 remaining items

  7. added this to the 1.1.9 milestone on Jan 29, 2019
  8. modified the milestones: 1.1.9, 1.2.0 on Mar 1, 2019
  9. stale commented on Sep 30, 2019

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

  10. stale commented on Oct 7, 2019

    @stale

    This issue has been automatically closed because it has not had recent activity. Please file a new issue if you are encountering a similar or related problem. Thank you for your contributions.

  11. lock commented on Dec 6, 2019

    @lock

    This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem. Why locking ? Having issues with the most up-to-date context.

  12. locked as resolved and limited conversation to collaborators on Dec 6, 2019
  13. modified the milestones: 1.2.0, 1.3.0 on Jul 16, 2021
  14. added a commit that references this issue on Jun 11, 2026
    2138b1b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions