Bug #17730: PEAR_Error in HTML_Table

From: Date: Wed, 12 Jun 2002 16:08:45 +0000
Subject: Bug #17730: PEAR_Error in HTML_Table
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-6953@lists.php.net to get a copy of this message
From: wima@tiscalinet.ch Operating system: All PHP version: 4.2.1 PHP Bug Type: PEAR related Bug description: PEAR_Error in HTML_Table I think its wrong to create an error with return new PEAR_Error("Error"); It shoult be created with PEAR::raiseError(). Sorry about my english. Here is the article from de.comp.lang.php: > Hallo > Ich verstehe noch nicht ganz, wie das mit dem Pear-Error gemeint ist. Mit > PEAR::setErrorHandling(PEAR_ERROR_CALLBACK,'handle_pear_error'); kann ich > den Error-Handler definieren, das klappt auch. Aber z.B. bei der > Table-Klasse wird bei einem Fehler ein PEAR_Error Objekt zurückgegeben > (return new PEAR_Error("First parameter to HTML_Table::addRow must be an > array");). Nun geht das irgendwie an meinem eigenen Handler vorbei, er wird > gar nicht aufgerufen. Der Konstruktor von PEAR_Error weiss ja gar nicht, > dass ich das Handling mit PEAR_ERROR_CALLBACK definiert habe. > Danke für eure Hilfe. > Marco Hi, ich würde dies als Bug bezeichnen, denn ein PEAR_Error sollte nicht per "new" erstellt werden, sondern per PEAR::raiseError(). Wende dich entweder an pear-dev oder bugs.php.net ... (Rubrik PEAR- related) Christian Dickmann -- Edit bug report at http://bugs.php.net/?id=17730&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=17730&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=17730&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=17730&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=17730&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=17730&r=support Expected behavior: http://bugs.php.net/fix.php?id=17730&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=17730&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=17730&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=17730&r=globals

« previous php.pear.dev (#6953) next »