I noticed that, in Hugo 0.141.0, there is a new try-catch. In an add-on I use for my blog, updating Hugo breaks the build because the mentioned add-on uses the old try-catch.
In this PR I’m working with another user that experienced the same thing, and we’re thinking about how to keep compatibility with older versions of Hugo using the new try-catch.
I had the same dilemma with one of my themes, and I concluded that it wasn’t possible. Go’s template parser fails if you try to use a keyword/function that’s not available in the current running version.
This is unfortunate, and I’m pondering on a way to improve this, but I’m not sure how that would work.