Skip to content

Fix exception handling in compiler #106

Open
@bentsherman

Description

@bentsherman

The compiler currently catches all CompilationFailedExceptions and ignores them:

https://github.com/nextflow-io/nextflow/blob/0f588576e193f4df81dcf7ffd7e0412f89540636/modules/nf-lang/src/main/java/nextflow/script/control/Compiler.java#L73-L82

This is so that parsing errors don't crash the language server. However, if an exception occurs for some other reason, like a bug, it is also ignored, and typically leads to the AST not being built and no errors reported.

The problem is that some legitimate parsing errors are being collected by the error collector and still being thrown. If I can remove that unnecessary throw, I should be able to remove these no-op catch clauses.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions