Browse Source

Changed Mongo → MongoDB in exception messages and logs

tags/2.0.0-beta
Alexander Makarov 11 years ago
parent
commit
65b2aa82a6
  1. 4
      extensions/yii/mongodb/Connection.php
  2. 2
      extensions/yii/mongodb/Exception.php

4
extensions/yii/mongodb/Connection.php

@ -223,7 +223,7 @@ class Connection extends Component
if (empty($this->dsn)) { if (empty($this->dsn)) {
throw new InvalidConfigException($this->className() . '::dsn cannot be empty.'); throw new InvalidConfigException($this->className() . '::dsn cannot be empty.');
} }
$token = 'Opening Mongo connection: ' . $this->dsn; $token = 'Opening MongoDB connection: ' . $this->dsn;
try { try {
Yii::trace($token, __METHOD__); Yii::trace($token, __METHOD__);
Yii::beginProfile($token, __METHOD__); Yii::beginProfile($token, __METHOD__);
@ -248,7 +248,7 @@ class Connection extends Component
public function close() public function close()
{ {
if ($this->mongoClient !== null) { if ($this->mongoClient !== null) {
Yii::trace('Closing Mongo connection: ' . $this->dsn, __METHOD__); Yii::trace('Closing MongoDB connection: ' . $this->dsn, __METHOD__);
$this->mongoClient = null; $this->mongoClient = null;
$this->_databases = []; $this->_databases = [];
} }

2
extensions/yii/mongodb/Exception.php

@ -20,6 +20,6 @@ class Exception extends \yii\base\Exception
*/ */
public function getName() public function getName()
{ {
return 'Mongo Exception'; return 'MongoDB Exception';
} }
} }
Loading…
Cancel
Save