Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthoralake
     

    I have this this PHP5 code in a plugin I'm porting from Rails. Can someone tell me how to port this to PHP4?

        function call_geocoder_service($url) {
            try {        
                if(GeoKit::Geocoders:'timeout')
                    timeout(GeoKit::Geocoders:'timeout') { 
                        return $this->do_get($url);
                    }
                return $this->do_get($url);
            } catch (Exception 'TimeoutError') {
                $msg = Ak::t('Geocoder call_geocoder_service timeout.');
                logger::error($msg);
                new GeocodeError($msg);    
                return null;
            }
        }
    
    •  
      CommentAuthorbermi
     

    For PHP4 you'll need to use a set of error handling functions like... hasErrors()/addError().... and trigger_error, You could also enable/disable a custom error handler to catch raised errors on PHP4