Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [jgit-dev] Exceptions in jgit

> Heh.  We don't have a good exception system.  Let me explain how
> we got where we are, its about the best rule we have...

OK. I understand. Until we have a good exception system I will just
define a few new exceptions in the same way as it is done now.

> I'd like to move to more specific checked exceptions, and stop
> throwing back any old IOException to the application caller.
> But this is a fairly major effort, and I'm just struggling to
> get the sideband protcol change implemented to match Git 1.7.0.2.
> I've basically written it off as something I just can't do.

Why checked exceptions?
I don't want to start yet another discussion on checked vs non-checked
exceptions in general since it often goes into discussing
personal preferences. However, as you wrote, there are also some
practical issues with checked exceptions like calling a method
that throws a checked exception inside the hasNext() method of
an Iterator. It often leads to wrapping the checked exception into
another exception without any added value.

I am willing to spend some effort on this topic.

Saša


Back to the top