Open ldeluigi opened 1 year ago
That's strange, as the actual error is re-raised:
Git errors come from the GitPython
dependency, and are raised as-is. I don't have their error handling top of mind -- but perhaps you can create a reproducable example and open an issue there?
@ldeluigi small reminder. Can you provide some more details?
@ldeluigi small reminder. Can you provide some more details?
Yes. I'd like to see the git error even if I enabled fallback_to_build_date. The raise instruction is done only in the else part of the catch clause.
I'd like to see a info message that explains why git fired the error...
The problem is that I enabled that option only for when a git repo doesn't exist at all. When it does, if something goes wrong, I want to fallback to build date + see what went wrong....
Could you add some code that checks if a .git folder is present and in that case you primt debug info on the git exception?
Ahhh, I see! Thanks for clarifying, and yes, logging the error when there's a fallback makes sense. Probably a warning level log is more fitting than a info level log.
https://github.com/timvink/mkdocs-git-revision-date-localized-plugin/blob/9cfce40942c83dd15834fb879caa4171a426ecdd/mkdocs_git_revision_date_localized_plugin/util.py#L127
When an error occurs with git commands, I can't debug the reason.
For example, I can't distinguish between:
PS. I'd like the same thing for your others git-based mkdocs plugins