Merge "Add file extension mapping for opus"
[lhc/web/wiklou.git] / includes / objectcache / MemcachedPeclBagOStuff.php
index e6df900..aa21cbb 100644 (file)
@@ -43,7 +43,7 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
         *                          values, but serialization is much slower unless the php.ini option
         *                          igbinary.compact_strings is off.
         * @param array $params
-        * @throws MWException
+        * @throws InvalidArgumentException
         */
        function __construct( $params ) {
                parent::__construct( $params );
@@ -89,7 +89,7 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
                // is as good as any. There's no way to configure libmemcached to use
                // hashes identical to the ones currently in use by the PHP client, and
                // even implementing one of the libmemcached hashes in pure PHP for
-               // forwards compatibility would require MWMemcached::get_sock() to be
+               // forwards compatibility would require MemcachedClient::get_sock() to be
                // rewritten.
                $this->client->setOption( Memcached::OPT_LIBKETAMA_COMPATIBLE, true );
 
@@ -100,13 +100,17 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
                                break;
                        case 'igbinary':
                                if ( !Memcached::HAVE_IGBINARY ) {
-                                       throw new MWException( __CLASS__ . ': the igbinary extension is not available ' .
-                                               'but igbinary serialization was requested.' );
+                                       throw new InvalidArgumentException(
+                                               __CLASS__ . ': the igbinary extension is not available ' .
+                                               'but igbinary serialization was requested.'
+                                       );
                                }
                                $this->client->setOption( Memcached::OPT_SERIALIZER, Memcached::SERIALIZER_IGBINARY );
                                break;
                        default:
-                               throw new MWException( __CLASS__ . ': invalid value for serializer parameter' );
+                               throw new InvalidArgumentException(
+                                       __CLASS__ . ': invalid value for serializer parameter'
+                               );
                }
                $servers = array();
                foreach ( $params['servers'] as $host ) {