ballerina-dev-tools icon indicating copy to clipboard operation
ballerina-dev-tools copied to clipboard

[Bug]: Some error types are not displayed in the API docs

Open nipunayf opened this issue 2 years ago • 0 comments

Description

module-ballerina-toml defines the errors in the sub-modules, and they are exposed to the user by redefining them through the default module. It expects to display the description of the following errors via the API docs.

# Represents the generic error type for the TOML package.
public type Error ParsingError|WritingError|FileError;

// Level 1
# Represents an error caused when failed to access the file.
public type FileError distinct (io:Error|file:Error);

# Represents an error caused during the parsing.
public type ParsingError parser:ParsingError;

# Represents an error caused when writing a TOML file.
public type WritingError writer:WritingError;

// Level 2
# Represents an error caused by the lexical analyzer.
public type LexicalError lexer:LexicalError;

# Represents an error caused for an invalid grammar production.
public type GrammarError parser:GrammarError;

# Represents an error caused by the Ballerina lang when converting a data type.
public type ConversionError parser:ConversionError;

However, only the following two errors are visible.

Steps to Reproduce

  1. Clone the Ballerina TOML repository git clone [email protected]:ballerina-platform/module-ballerina-toml.git
  2. Run the bal doc command on the package.
  3. Check the errors in the API docs google-chrome target/apidocs/ballerina/toml/1.0.0/index.html

The error can be reproduced with module-ballerina-yaml as well.

Affected Version(s)

2201.2.1

OS, DB, other environment details and versions

OS - Ubuntu 22.04.1 LTS

Related area

-> API Docs

Related issue(s) (optional)

No response

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response

nipunayf avatar Oct 11 '22 06:10 nipunayf