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

Add more context to Like but cell Errors #603

Open
MicahGale opened this issue Dec 3, 2024 · 0 comments
Open

Add more context to Like but cell Errors #603

MicahGale opened this issue Dec 3, 2024 · 0 comments
Labels
feature request An issue that improves the user interface.

Comments

@MicahGale
Copy link
Collaborator

Currently when a like but cell is present the error has little context:

self = <montepy.input_parser.cell_parser.CellParser object at 0x7f1bad19eb40>, p = <sly.yacc.YaccProduction object at 0x7f1b20f97840>

    @_("number_phrase KEYWORD")
    def cell(self, p):
        if p.KEYWORD.lower() == "like":
>           raise UnsupportedFeature("The like but feature is not supported")
E           montepy.errors.UnsupportedFeature: The like but feature is not supported
E
E           Error came from CELL: -1, mat: 0, DENS: None from an unknown file.

../../mambaforge/lib/python3.12/site-packages/montepy/input_parser/cell_parser.py:45: UnsupportedFeature

(some context added by pytest).

Context ala #579 would be helpful for this.

@MicahGale MicahGale added the feature request An issue that improves the user interface. label Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request An issue that improves the user interface.
Projects
None yet
Development

No branches or pull requests

1 participant