Re: PEAR_Error

From: Date: Tue, 12 Sep 2000 13:34:03 +0000
Subject: Re: PEAR_Error
References: 1  Groups: php.pear 
Request: Send a blank email to php-pear+get-248@lists.php.net to get a copy of this message
On Tue, 12 Sep 2000, Ulf Wendel wrote: > suggestion: > > function PEAR_Error( $message = "unknown error", > $code = 0, > $mode = "", > $level = "" > ) { > > $this->message = $message; > $this->code = $code; > if ( ""!=$mode ) $this->mode = $mode; > if ( ""!=$level ) $this->level = $level > > advantage: > Using this more "conservative" contructor you can have error > classes that inherit a default behavior from their parents. The > parent would not only set $error_message_prefix but $mode and > $level. It's better to use NULL instead of empty strings, and then test with isset(). -Andrei "Man, if you gotta ask you'll never know." - Louis Armstrong, when asked "What is jazz?"

« previous php.pear (#248) next »