Re: error stack

From: Date: Fri, 02 Jul 1999 05:03:46 +0000
Subject: Re: error stack
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-7969@lists.php.net to get a copy of this message
I can probably throw something togather like that.. I just dont see the reason behind it. I dont see much use for it. Mark > > I would like to add better error handling to the imap_* functions. My > current plan is something like this: > > New function: php3_imap_init_error_queue() > - this would return an empty array (ie, $foo = imap_init_error_queue(); > (i'll take a shorter name suggestion if you've got one) > > Change to mm_log: > - if imap_init_error_queue() has been called, add errors to the error queue > instead of php3_error()ing them. > - otherwise, splat them to the browser (depending on error level) - the > current behavior. > > If that makes sense, here are my questions: > > Are there any functions that are called on page start and end? It seems like > I'll need a global variable of some sort, or a symbol table entry. How do I > clean it up/make sure it's initialized properly? > > Using a symbol table entry, how would I get the name of the var on the other > side of the = ? The example code in apidoc.txt is: > > > hash_update(active_symbol_table,"foo",sizeof("foo"),&arr,sizeof(pval),NULL); > > What do I replace "foo" with so that $foo = imap_init_error_queue() and $bar > = imap_init_error_queue() both work? Or is there a different function I'm > missing? > > The other thing I thought of was sticking: > pval *imap_error_queue = NIL; in imap.c. Then mm_log would check that for > NIL; if it was NIL it would php3_error(); if it was set to something then it > would add an array entry to it. The problem seems to be making sure that > it's always set to NIL on a page load. Also, where would I free() (efree?) > the error queue? > > If it sounds like I con't know what I'm doing in c, I probably don't. > Hopefully someone can help me out without me being too much of a nuisance. > > Thanks, > -chuck > > -- > Charles Hagenbuch, <chagenbu@wso.williams.edu> > > -- > PHP Development Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net > For additional commands, e-mail: php-dev-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.dev (#7969) next »