Some tools (e.g. PHPStorm) can trace exceptions through the
call tree and show warnings when a call can throw an exception which
is neither handled nor acknowledged via @throws annotation.
This is quite useful but currently too noisy to use due to all methods
involving some kind of DB interaction potentially throwing a DBError.
To avoid false warnings, make DBError inherit from RuntimeException
to signal it to such tools that it is not meant to be handled.
Change-Id: I847d258791b128547e10672c5e06a9ce18458371
namespace Wikimedia\Rdbms;
-use Exception;
+use RuntimeException;
/**
* Database error base class
* @ingroup Database
*/
-class DBError extends Exception {
+class DBError extends RuntimeException {
/** @var IDatabase|null */
public $db;