logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ihabu...@apache.org
Subject [43/43] git commit: Added missing 'use' statements for exception classes
Date Thu, 28 Nov 2013 16:04:13 GMT
Added missing 'use' statements for exception classes

Signed-off-by: Ivan Habunek <ivan.habunek@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/logging-log4php/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4php/commit/75ec90ff
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4php/tree/75ec90ff
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4php/diff/75ec90ff

Branch: refs/heads/v3
Commit: 75ec90ff5dee237caabcd4124eb6fe70c0080131
Parents: 378ce1a
Author: Ivan Habunek <ivan.habunek@gmail.com>
Authored: Thu Nov 28 17:02:28 2013 +0100
Committer: Ivan Habunek <ivan.habunek@gmail.com>
Committed: Thu Nov 28 17:02:28 2013 +0100

----------------------------------------------------------------------
 src/Appenders/MongoDBAppender.php     | 4 +---
 src/Appenders/RollingFileAppender.php | 2 ++
 src/ReflectionUtils.php               | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/75ec90ff/src/Appenders/MongoDBAppender.php
----------------------------------------------------------------------
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 @@ namespace Apache\Log4php\Appenders;
 
 use Apache\Log4php\LoggingEvent;
 
-use Exception;
-
 use Mongo;
 use MongoCollection;
 use MongoDate;
@@ -148,7 +146,7 @@ class MongoDBAppender extends AbstractAppender
         } 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');
         }

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/75ec90ff/src/Appenders/RollingFileAppender.php
----------------------------------------------------------------------
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.

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/75ec90ff/src/ReflectionUtils.php
----------------------------------------------------------------------
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 @@ class ReflectionUtils
      * 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 @@ class ReflectionUtils
 
         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);
         }


Mime
View raw message