httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: [apreq-2] libapreq_cgi and getenv
Date Mon, 20 Oct 2003 04:23:54 GMT
Randy Kobes wrote:

>>it doesn't hurt to check for failure. Probabaly write a macro to avoid noise
>>(adopted from mp2):
>>
>>+ #define APREQ_ASSERT(rc_run) do { \
>>+         apr_status_t rc = rc_run; \
>>+         if (rc != APR_SUCCESS) { \
>>+             ap_log_error(APLOG_MARK, APLOG_ERR, rc, NULL, "failed: "); \
>>+         } \
>>+     } while (0)
[...]
> Thanks, Stas! That is a good check ...

well, ideally it should abort the execution as well...

Also may be APREQ_ASSERT is not the best name, in mp2 it's called 
MP_FAILURE_CROAK()... may be APREQ_STATUS_CHECK? or something like that?


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Mime
View raw message