Files
gerrit/java
Dave Borowitz a4fe999a75 Make StorageException a RuntimeException
In the context of a Gerrit server, StorageExceptions are generally
speaking not recoverable: the only place that should be catching them is
a top-level request handler such as RestApiServlet. Such a handler also
needs to be able to catch RuntimeExceptions, and indeed RestApiServlet
already catches bare Exception.

The general best practice in Java today is to use unchecked exception
when errors are not intended to be recoverable[citation needed]. This
avoids polluting interfaces with too many checked exception types.

After this change, most "throws StorageException" clauses are redundant
and can be cleaned up. However, that work is left for future commits;
this commit does the minimum work required to compile.

This commit does not additionally touch DuplicateKeyException, which
also becomes a RuntimeException since it inherits from StorageException.

Change-Id: I75230cf99145d886a5d872150e333519eb54acbb
2019-04-17 19:42:10 -07:00
..
2018-11-13 15:06:26 -08:00
2018-08-14 08:07:59 +02:00