/[cvs]/nfo/php/libs/org.netfrag.glib/DataSource/Proxy/XMLRPC.php
ViewVC logotype

Diff of /nfo/php/libs/org.netfrag.glib/DataSource/Proxy/XMLRPC.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by joko, Fri Mar 28 03:00:12 2003 UTC revision 1.5 by joko, Fri Mar 28 06:56:52 2003 UTC
# Line 14  Line 14 
14  ##    $Id$  ##    $Id$
15  ##    --------------------------------------------------------------------------  ##    --------------------------------------------------------------------------
16  ##    $Log$  ##    $Log$
17    ##    Revision 1.5  2003/03/28 06:56:52  joko
18    ##    updated logging/debugging code
19    ##
20  ##    Revision 1.4  2003/03/28 03:00:12  joko  ##    Revision 1.4  2003/03/28 03:00:12  joko
21  ##    enhanced error- and exception-handling  ##    enhanced error- and exception-handling
22  ##  ##
# Line 138  class DataSource_Proxy_XMLRPC extends Cl Line 141  class DataSource_Proxy_XMLRPC extends Cl
141      //print Dumper($args);      //print Dumper($args);
142      if (is_array($args)) {      if (is_array($args)) {
143        foreach ($args as $key => $val) {        foreach ($args as $key => $val) {
144            //print "key: $key<br/>";
145          $key = strtoupper($key);          $key = strtoupper($key);
146          $this->$key = $val;          $this->$key = $val;
147        }        }
# Line 167  class DataSource_Proxy_XMLRPC extends Cl Line 171  class DataSource_Proxy_XMLRPC extends Cl
171    
172      $this->log(get_class($this) . "->send: " . $command, PEAR_LOG_DEBUG);      $this->log(get_class($this) . "->send: " . $command, PEAR_LOG_DEBUG);
173            
174        /*
175      if (!$this->isConnected()) {      if (!$this->isConnected()) {
176        $this->_raiseException( "->send[ command=$command ]: not connected while trying to send command!");        $this->_raiseException( "->send[ command=$command ]: not connected while trying to send command!");
177        return;        return;
178      }      }
179        */
180            
181      // do 'encode' here and ...      // do 'encode' here and ...
182      if ($options[utf8]) {      if ($options[utf8]) {
# Line 272  class DataSource_Proxy_XMLRPC extends Cl Line 278  class DataSource_Proxy_XMLRPC extends Cl
278        
279    function _raiseException($message, $code = null) {    function _raiseException($message, $code = null) {
280            
281        $classname = get_class($this);
282        
283      // aggregate errors for this run/query      // aggregate errors for this run/query
284      $this->_add_error($message, $code);      $this->_add_error($classname . $message, $code);
285            
286      // spout out the error message of the raised exception      // spout out the error message of the raised exception
287      $this->log(get_class($this) . $message, PEAR_LOG_ERR);      $this->log($classname . $message, PEAR_LOG_ERR);
288    
289      // handle some stuff regarding more special behaviour (will this get rule-based sometimes?)      // handle some stuff regarding more special behaviour (will this get rule-based sometimes?)
290            
# Line 284  class DataSource_Proxy_XMLRPC extends Cl Line 292  class DataSource_Proxy_XMLRPC extends Cl
292      $connect_condition = $this->FORCE_CONNECT = ($this->isConnected() && $this->DISCONNECT_ON_ERROR);      $connect_condition = $this->FORCE_CONNECT = ($this->isConnected() && $this->DISCONNECT_ON_ERROR);
293      if ($connect_condition) {      if ($connect_condition) {
294        $message = '->_raiseException: [DISCONNECT_ON_ERROR] done transparently. Please reconnect manually.';        $message = '->_raiseException: [DISCONNECT_ON_ERROR] done transparently. Please reconnect manually.';
295        $this->_add_error($message, $code);        $this->_add_error($classname . $message, $code);
296        //$this->log(get_class($this) . $message, PEAR_LOG_WARNING);        //$this->log($classname . $message, PEAR_LOG_WARNING);
297        $this->log(get_class($this) . $message, PEAR_LOG_ERR);        $this->log($classname . $message, PEAR_LOG_ERR);
298        $this->meta[connected] = 0;        $this->meta[connected] = 0;
299        $this->_save_meta();        $this->_save_meta();
300      }      }

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed