diff options
author | Daimona Eaytoy <daimona.wiki@gmail.com> | 2023-06-10 02:29:51 +0200 |
---|---|---|
committer | DannyS712 <dannys712.wiki@gmail.com> | 2024-01-19 22:01:12 +0000 |
commit | 2520f3d1c4054f4e2e19fd8a0ccd3792cc9772c9 (patch) | |
tree | 104082c2cab908d5cd25ff7198987a36e988fb11 /includes/historyblob | |
parent | 1d6776fdbccf956e1ce4747a9c39dd8a05cdea88 (diff) | |
download | mediawikicore-2520f3d1c4054f4e2e19fd8a0ccd3792cc9772c9.tar.gz mediawikicore-2520f3d1c4054f4e2e19fd8a0ccd3792cc9772c9.zip |
Replace more usages of deprecated MWException
Bug: T328220
Change-Id: Ie9b56bcf5e962e275d80570cad98d676da505894
Diffstat (limited to 'includes/historyblob')
-rw-r--r-- | includes/historyblob/DiffHistoryBlob.php | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/includes/historyblob/DiffHistoryBlob.php b/includes/historyblob/DiffHistoryBlob.php index fec18491a50b..1168567e6c64 100644 --- a/includes/historyblob/DiffHistoryBlob.php +++ b/includes/historyblob/DiffHistoryBlob.php @@ -73,18 +73,17 @@ class DiffHistoryBlob implements HistoryBlob { public function __construct() { if ( !function_exists( 'gzdeflate' ) ) { - throw new MWException( "Need zlib support to read or write DiffHistoryBlob\n" ); + throw new RuntimeException( "Need zlib support to read or write DiffHistoryBlob\n" ); } } /** - * @throws MWException * @param string $text * @return string */ public function addItem( $text ) { if ( $this->mFrozen ) { - throw new MWException( __METHOD__ . ": Cannot add more items after sleep/wakeup" ); + throw new BadMethodCallException( __METHOD__ . ": Cannot add more items after sleep/wakeup" ); } $this->mItems[] = $text; @@ -115,12 +114,9 @@ class DiffHistoryBlob implements HistoryBlob { return $this->getItem( $this->mDefaultKey ); } - /** - * @throws MWException - */ private function compress() { if ( !function_exists( 'xdiff_string_rabdiff' ) ) { - throw new MWException( "Need xdiff support to write DiffHistoryBlob\n" ); + throw new RuntimeException( "Need xdiff support to write DiffHistoryBlob\n" ); } if ( isset( $this->mDiffs ) ) { // Already compressed |