Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kdoc generation for "throws exception" #975

Closed
orchestr7 opened this issue Jul 10, 2021 · 1 comment · Fixed by #990
Closed

Kdoc generation for "throws exception" #975

orchestr7 opened this issue Jul 10, 2021 · 1 comment · Fixed by #990
Assignees
Labels
autofix Issues related to diktat in autofix mode bug Something isn't working
Milestone

Comments

@orchestr7
Copy link
Member

    fun readAndParseFile(): TomlFile {
        try {
            val ktomlPath = toml.toPath()
            val ktomlLinesFromFile = FileSystem.SYSTEM.read(ktomlPath) {
                // FixMe: may be we need to read and at the same time parse (to make it parallel)
                generateSequence { readUtf8Line() }.toList()
            }
            return parseStringsToTomlNode(ktomlLinesFromFile)
        } catch (e: FileNotFoundException) {
            println("Not able to find toml-file in the following path: $toml")
            throw e
        }
    }

diktat fixes it with * @throws e instead of * @throws FileNotFoundException

@orchestr7 orchestr7 added the bug Something isn't working label Jul 10, 2021
@petertrr
Copy link
Member

Yep, I believe we don't properly support rethrown exceptions :(

@petertrr petertrr added this to the 1.0.0 milestone Jul 14, 2021
@petertrr petertrr added the autofix Issues related to diktat in autofix mode label Jul 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autofix Issues related to diktat in autofix mode bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants