Added missing 'use' statements for exception classes
Signed-off-by: Ivan Habunek <ivan.habunek@gmail.com>
diff --git a/src/Appenders/MongoDBAppender.php b/src/Appenders/MongoDBAppender.php
index c07e6b8..6123f83 100644
--- a/src/Appenders/MongoDBAppender.php
+++ b/src/Appenders/MongoDBAppender.php
@@ -20,8 +20,6 @@
use Apache\Log4php\LoggingEvent;
-use Exception;
-
use Mongo;
use MongoCollection;
use MongoDate;
@@ -148,7 +146,7 @@
} catch (\InvalidArgumentException $ex) {
$this->closed = true;
$this->warn(sprintf('Error while selecting mongo database: %s', $ex->getMessage()));
- } catch (\Exception $ex) {
+ } catch (Exception $ex) {
$this->closed = true;
$this->warn('Invalid credentials for mongo database authentication');
}
diff --git a/src/Appenders/RollingFileAppender.php b/src/Appenders/RollingFileAppender.php
index 35af51a..a85c6aa 100644
--- a/src/Appenders/RollingFileAppender.php
+++ b/src/Appenders/RollingFileAppender.php
@@ -18,6 +18,8 @@
namespace Apache\Log4php\Appenders;
+use Apache\Log4php\LoggerException;
+
/**
* RollingFileAppender writes logging events to a specified file. The
* file is rolled over after a specified size has been reached.
diff --git a/src/ReflectionUtils.php b/src/ReflectionUtils.php
index d5e488f..9ccbd6a 100644
--- a/src/ReflectionUtils.php
+++ b/src/ReflectionUtils.php
@@ -65,7 +65,7 @@
* Example:
*
* $arr['xxxname'] = 'Joe';
- * $arr['xxxmale'] = true;
+ * $arr['xxxmale'] = true;
* and prefix xxx causes setName and setMale.
*
* @param array $properties An array containing keys and values.
@@ -116,7 +116,7 @@
if (!method_exists($this->obj, $method)) {
$class = get_class($this->obj);
- throw new Exception("Error setting log4php property $name to $value: no method $method in class $class.");
+ throw new \Exception("Error setting log4php property $name to $value: no method $method in class $class.");
} else {
return call_user_func(array($this->obj, $method), $value);
}