Re: PEAR::setErrorHandling conflicts with nextId() ?

From: Date: Fri, 31 Aug 2001 12:32:35 +0000
Subject: Re: PEAR::setErrorHandling conflicts with nextId() ?
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-1733@lists.php.net to get a copy of this message
Stig Bakken wrote: > > > IMHO it's better to use expectError() than pushErrorHandling() for the > sequence code. I don't know if you agree Tomas? > Sure, but let me first finish to debug PEAR.php :-) Now there is a problem (reported by Piotr) in this case: $db->setErrorHandling(PEAR_ERROR_CALLBACK, 'some_func'); $db->nextID('non', false); Outputs: "Invalid callback function" but do the work. I've done a patch to solve that, but involves to drop the "default_error_calback" var (that I never was very sure if it is really needed or not). For me, if you setup a error mode you could setup the error options for this mode. If a PEAR_ERROR_CALLBACK mode is selected, its error options should be the "default_error_options". Why is it different from the others modes and use "default_error_callback" instead of "default_error_options"? This is my patch: use default_error_options as the options for PEAR_ERROR_CALLBACK. Tests were right and also I did some grep's over php4/pear to ensure that no classes use "default_error_callback". Opinions? Tomas V.V.Cox

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