Re: Re: cvs: php4 /main main.c php.h
| From: | (Marcus Börger) | Date: | Thu, 08 Aug 2002 10:31:30 +0000 |
| Subject: | Re: Re: cvs: php4 /main main.c php.h | ||
| References: | 1 2 3 4 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-86640@lists.php.net to get a copy of this message | ||
In reply to naming scheme (Adam & Derick).
I choose php_error_func<n> because thats what it does: it displays a
standard error message with function name and <n> parameters from
the call.
Wez choose php_error_docref to emphasise the docref parameter.
I think the number is needed because we do not have C++ here. Or do
we want to have something like php_error_func, php_error_func_param,
php_error_func_param_param?
For me the name is not so important. According to the order of parameters
i choose the order to separate char* parameters with TSRMLS parameter.
Maybe the Type parameter is better for that purpose. This makes:
PHPAPI void php_error_func0(const char *docref TSRMLS_DC, int type, const char *format, ...)
PHPAPI void php_error_func1(const char *docref, const char *param1 TSRMLS_DC, int type, const char *format, ...)
PHPAPI void php_error_func2(const char *docref, const char *param1, const char *param2 TSRMLS_DC, int type, const char *format, ...)
or php_error_docref<n>
marcus
At 21:28 07.08.2002, Adam Maccabee Trachtenberg <adam@trachtenberg.com> wrote:
On Wed, 7 Aug 2002, Marcus Börger wrote: Marcus -- This patch introduces new functions php_error_func<n>. These support unified error messages AND they allow to show parameters in call. I like this idea, but don't think the naming scheme clearly explains the difference among the various php_error_func()s. Can you make the function names more descriptive of what they actually do? And why someone would use php_error_func1() over php_error_func2()? -adamAt 12:09 08.08.2002, derick@php.net wrote:
On Thu, 8 Aug 2002, Markus Fischer wrote:Wow!I'm impressed. That's one of the best ideas I've read on this list for months, and I really mean it that way. +1Except for the naming of these functions (and perhaps order of parameters) it definitely sounds like a nice idea. But beware that get_active:function_name() can also return NULL. regards, Derick- MarkusOn Wed, Aug 07, 2002 at 11:32:19PM +0100, Wez Furlong wrote :This seems OK, but I have a suggestion: add a string parameter that refers to a location in the manual.[...]So, the C code would look something like this: php_error_docref(E_WARNING, "features.remote-files", "Cannot write to remote files using ftp");[...]Warning: Cannot write to remote files using ftp. <a href="http://php.net/manual/en/features.remote-files.php">Click Here for more information.</a> or if html_errors is off: Warning: Cannot write to remote files using ftp. See http://php.net/manual/en/features.remote-files.php for more information.-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php --------------------------------------------------------------------------- Did I help you? http://www.derickrethans.nl/link.php?url=giftlist Frequent ranting: http://www.derickrethans.nl/ ---------------------------------------------------------------------------PHP: Scripting the Web - derick@php.net All your branches are belong to me! SRM: Script Running Machine - www.vl-srm.net--------------------------------------------------------------------------- -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php