libgit2/libgit2 — Issue #566: So excited about new error handling, I may pass out
Author: arrbee
Created: 2012-02-18 07:07:46+00:00
State: open

This is a serious issue. :wink: The new error handling code :sparkles:

Reading over https://github.com/libgit2/libgit2/compare/development...new-error-handling and so much code is cleaned up, I love it. So much rewriting with a lot of attention to detail. I'm am amazed.

Really like the consistency - the rules are clear and let us capture the important error information without cluttering up the codebase with crap (like all the gotos and heavy nesting for out of memory errors that, if they were to happen, mean that the user is really screwed anyhow).

I only have one real concern, and it is quite minor - there seem to be a couple of places where some detail about the specific error that occurred (e.g. exactly what in the packfile was corrupt?) is eliminated. I know this is intentional, but I wonder if some users of library might care about exactly what went wrong. Of course, nothing about the new structure prevents us from going back and adding more detail to the error messages at a future point if there are any users who care, and for now, simplifying this cleans up a ton of crap.

Looking forward to writing code using the new error style!