-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
Log spam caused by try
#13320
Comments
That construct is eating the error. See https://gohugo.io/functions/go-template/try/. Do this instead:
Directly above the error you will see the media subtype. We'll remove that. If you want to ignore the error, perhaps while ranging over a collection of resources:
|
Thanks for the tip. I minimized it for the sake of example. My actual use case is setting a value in a dictionary where I'm ok with it being null:
I think this is ok? The user of the partial is expected to deal with the potentially-nil value |
Yes. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I think
try
might have some debug logging enabled. When I use{{ $width := (try $resource.Width) }}
I get a bunch of logging of what looks like the SubType of the resourceWhat version of Hugo are you using (
hugo version
)?Does this issue reproduce with the latest release?
Yes
The text was updated successfully, but these errors were encountered: