jenkins-bot has submitted this change and it was merged.
Change subject: Remove usages of CdbCompat class alises
......................................................................
Remove usages of CdbCompat class alises
Change-Id: Id7223689f135c3ce3e4193f8c724b52d3f39dfd5
---
M includes/cache/localisation/LCStoreCDB.php
1 file changed, 13 insertions(+), 10 deletions(-)
Approvals:
Florianschmidtwelzow: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/cache/localisation/LCStoreCDB.php
b/includes/cache/localisation/LCStoreCDB.php
index 386ef8c..2c3f58f 100644
--- a/includes/cache/localisation/LCStoreCDB.php
+++ b/includes/cache/localisation/LCStoreCDB.php
@@ -17,6 +17,9 @@
*
* @file
*/
+use Cdb\Exception;
+use Cdb\Reader;
+use Cdb\Writer;
/**
* LCStore implementation which stores data as a collection of CDB files in the
@@ -32,10 +35,10 @@
*/
class LCStoreCDB implements LCStore {
- /** @var CdbReader[] */
+ /** @var Reader[] */
private $readers;
- /** @var CdbWriter */
+ /** @var Writer */
private $writer;
/** @var string Current language code */
@@ -61,8 +64,8 @@
$this->readers[$code] = false;
if ( file_exists( $fileName ) ) {
try {
- $this->readers[$code] =
CdbReader::open( $fileName );
- } catch ( CdbException $e ) {
+ $this->readers[$code] = Reader::open(
$fileName );
+ } catch ( Exception $e ) {
wfDebug( __METHOD__ . ": unable to open
cdb file for reading\n" );
}
}
@@ -74,8 +77,8 @@
$value = false;
try {
$value = $this->readers[$code]->get( $key );
- } catch ( CdbException $e ) {
- wfDebug( __METHOD__ . ": CdbException caught,
error message was "
+ } catch ( Exception $e ) {
+ wfDebug( __METHOD__ . ": \Cdb\Exception caught,
error message was "
. $e->getMessage() . "\n" );
}
if ( $value === false ) {
@@ -100,8 +103,8 @@
}
try {
- $this->writer = CdbWriter::open( $this->getFileName(
$code ) );
- } catch ( CdbException $e ) {
+ $this->writer = Writer::open( $this->getFileName( $code
) );
+ } catch ( Exception $e ) {
throw new MWException( $e->getMessage() );
}
$this->currentLang = $code;
@@ -111,7 +114,7 @@
// Close the writer
try {
$this->writer->close();
- } catch ( CdbException $e ) {
+ } catch ( Exception $e ) {
throw new MWException( $e->getMessage() );
}
$this->writer = null;
@@ -125,7 +128,7 @@
}
try {
$this->writer->set( $key, serialize( $value ) );
- } catch ( CdbException $e ) {
+ } catch ( Exception $e ) {
throw new MWException( $e->getMessage() );
}
}
--
To view, visit https://gerrit.wikimedia.org/r/281277
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id7223689f135c3ce3e4193f8c724b52d3f39dfd5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Addshore <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits