Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jgit-dev] Exceptions thrown by


Some subclasses of GitCommand have call() signatures that throw only GitApiException (CherryPick, Revert), some throw only JGitInternalException (AddNote, Blame, DeleteTag), and others throw a mix of exception types.

Going forward, is there a pattern that new commands should follow?  Just mirror the signature of GitCommand and declare a throws of Exception only?

Looking at the documentation of GitApiException, it would seem that maybe that should be the exception class to throw consistently for newly added commands.

This is just a general question of what is the best practice that we may want to document and follow for consistency as new Git commands are added.

Kevin Sawicki

Back to the top