Skip to content

[FEATURE]: print error positions in the logs #2109

@vil1

Description

@vil1

Is there an existing issue for this?

  • I have searched the existing issues

Category of feature request

Transpiler

Problem statement

The range field of TranspileError is ignored by the __str__ method. Having it printed would help users figure out what went wrong.

A detail needs attention though: the code ranges computed by morpheus refer to either the input file (for parsing errors) or the output file (for errors that occurred after parsing).

Proposed Solution

  • Print the range field in TranspilerError's __str__ method.
  • Make sure that the path field points to the correct field depending on the error kind (input file for PARSING, output file otherwise)

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions