Mark DBError as runtime exception
authorGergő Tisza <tgr.huwiki@gmail.com>
Tue, 2 Jan 2018 22:07:28 +0000 (14:07 -0800)
committerGergő Tisza <gtisza@wikimedia.org>
Wed, 3 Jan 2018 02:26:17 +0000 (02:26 +0000)
commitcd222cc601cdd4a95eb37389afbb503167664b90
treed2491e7d84b783162611957ad7de41ea9f542ed3
parent2e248f0bb20cbdf7738a6d44a843eb546c3bbf23
Mark DBError as runtime exception

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
includes/libs/rdbms/exception/DBError.php