Skip to content

Problem with Renoir Try/Except #387

Answered by gi0baro
KellerKev asked this question in Q&A
Discussion options

You must be logged in to vote

The issue seems to be the usage of include inside try-except blocks. Renoir parsing engine works kinda like a state machine, thus an exception outside the rendering context won't undo the processed blocks.

Can I ask you why wrapping the entire logic in a try-except block? If I got the point you can't be sure level is defined. If that's the case, I suggest you to workaround the issue with something like:

[[ level = globals().get("level", None) ]]

before the if block.

Also, please open up an issue for this on the renoir repo, but mind that it will probably require quite a lot of work to be fixed.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@KellerKev
Comment options

@gi0baro
Comment options

@KellerKev
Comment options

Answer selected by KellerKev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants