Files
gerrit/gerrit-acceptance-framework/src/test/java
Dave Borowitz ba6b05d50c Make NoSuchChangeException inherit from OrmException
More than a few throws and catch clauses already treat
NoSuchChangeException and OrmException identically; the few catch
clauses that actually care about the difference already catch
NoSuchChangeException explicitly. So this change results in a lot less
repeition.

The proximate reason for this change is I want to throw
NoSuchChangeException from ChangeNotes#load(), which is necessarily
called in a lot of places (because lazy-loading needs to be supported
when loading changes from the index with arbitrary
ListChangesOptions). Adding this new exception method is of course
possible but would have rippled out quite far.

The potential downside of this change is that authors of new code
calling a method that throws OrmException might not immediately know
that catching NoSuchChangeException is something they might want to
think about. However, I'm hoping this doesn't come up much in
practice; most callers should already have a loaded ChangeNotes or
similar object, so a NoSuchChangeException that late in the codepath
really is an unexpected error case.

Change-Id: Ibf28414344ebeeb4d37c28576feb14462e7c378a
2016-12-21 11:02:53 -05:00
..