oh so it isn't even built like that already.
i can't figure out how APR handles /stores errors. i spent far too
much time this weekend going over the svn head, but don't know nearly
enough C or any xs to make much of any sense of it
personally though, i'd love to see a way to check for errors ( or
status ) - that works like either of the below - so i'm going to
wishlist them now. and everyone can say its a bad idea or 'its a
good idea, here's how to patch it', as i can't figure it out.
1 - a version of the perl glue ( and whatever else ) for the
xxx_status functions that either
returns the error code instead of the error message
returns a tuple of code/message ie: [ 'OVERLIMIT','The POST param
exceeds the configured limit']
2 - something that only returns errors or lets one probe for a
specific error.( the former would be better, but i think the latter
might be easier to code)
ie:
if ( my $error = $apr->body_errors() )
{
if ( $error == 'OVERLIMIT' ){}
}
or
if ( $apr->body_errors() )
{
if ( $apr->has_error('OVERLIMIT') ){}
}
as-is, things seem awkward because body_status, args_status are the
method of catching an error - but also seem to return non-error text.
On Feb 13, 2006, at 6:41 PM, Joe Schaefer wrote:
Jonathan Vanasco <[EMAIL PROTECTED]> writes:
Anyone? This is killing me.
The only thing I've been able to figure out is this:
my $error = $apacheRequest->body_status();
if ( $error eq 'Exceeds configured maximum limit' )
That looks ok to me for now; but what we really need to do
is export the constant in Error.xs so you can write
if ($error == APR::Request::Error::OVERLIMIT)
--
Joe Schaefer