Author: chammers
Date: Tue Oct  6 19:43:29 2009
New Revision: 822460

URL: http://svn.apache.org/viewvc?rev=822460&view=rev
Log:
If the user tries to set an option via the config file that does
not exists it was silently ignored. Now an exception is raised
to give the user a hint where he made the error.

Modified:
    incubator/log4php/trunk/src/main/php/LoggerReflectionUtils.php

Modified: incubator/log4php/trunk/src/main/php/LoggerReflectionUtils.php
URL: 
http://svn.apache.org/viewvc/incubator/log4php/trunk/src/main/php/LoggerReflectionUtils.php?rev=822460&r1=822459&r2=822460&view=diff
==============================================================================
--- incubator/log4php/trunk/src/main/php/LoggerReflectionUtils.php (original)
+++ incubator/log4php/trunk/src/main/php/LoggerReflectionUtils.php Tue Oct  6 
19:43:29 2009
@@ -108,8 +108,7 @@
                $method = "set" . ucfirst($name);
                
                if(!method_exists($this->obj, $method)) {
-                       // no such setter method
-                       return;
+                       throw new Exception("Error setting log4php property 
$name to $value: no method $method in class ".get_class($this->obj)."!");
                } else {
                        return call_user_func(array($this->obj, $method), 
$value);
                } 


Reply via email to