hello all,
here is my construtor for a personnal PHP Class:
function CacheMemory($online,$host,$port){
$this->host=$host;
$this->port=$port;
$this->prefix='aws';
if($online){
try{
$this->memcache = new Memcache;
$this->memcacheEnabled=$this->memcache->pconnect($this->host,
$this->port);
}catch(Exception $e){
$this->memcacheEnabled=false;
//echo $e->getMessage();
}
}else{
$this->memcacheEnabled=false;
}
}
In my main application i use an error Handler.
The problem is that sometimes i've got:
Date : 2009-07-06 12:26:08 UTC
Error type : E_WARNING
Error text : Memcache::pconnect(): Can't connect to 195.xx.xx.xxx:
11211, Unknown error (0)
File : inc/libs/CacheMemory.php
Line : 18
I don't want that the ErrorHandler to be notified when the MC connot
connect.
Isn't what the try/catch is suppose to do ?
best regards and thanks for any help