Handling halferrors
| From: | Tarjei Huse | Date: | Thu, 04 Sep 2003 10:59:35 +0000 |
| Subject: | Handling halferrors | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-21058@lists.php.net to get a copy of this message | ||
Hi, I'm working on getting Net_LDAP to provide better handling of errors
of various kinds and would like to get some tips.
This relates especially to searches. When doing a search the ldaperrno
might be set because of conditions like no objects found or too many
objects found (i.e. the ldapservers sizelimmit has been reached).
I want to handle that as simple as possible, in the first case returning
an Net_LDAP_Search object with a count of 0. With the sizelimmit I'd
like to have the option to switch the search to a paged search so that
the user may get all the objects if doing a while ($entry =
$searc->shift_entry()) {} for example.
So what I'm wondering about is: What is the standard pear way of doing
these things? I want to give the user a way to check what happened and
be able to handle it differently if they want to, but have a sane
default that makes the class easy to work with.
Is there some some default call like $obj->getErrono() or something like
that that might be used?
Also, if I should write some documentation on using the class, what
format do you want it in?
Tarjei