Skip to content

Don't use try/catch for expected program flow #6

Description

@humphd

In https://github.com/tcvan0707/txt2html/blob/main/src/txt2html.js#L64-L77 you are using a pattern of code that should be avoided. Your catch block is providing an alternate code path. In reality, the catch should only be used for exceptional circumstances. If you have code that might happen, move it to an if/else style.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions