Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /main main.c php.h php_globals.h

2002-08-09 Thread Marcus Börger

At 01:04 10.08.2002, you wrote:
In-Reply-To: [EMAIL PROTECTED]
Message-ID: [EMAIL PROTECTED]
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=iso-8859-1
Content-Transfer-Encoding: 8BIT

On Sat, 10 Aug 2002, Marcus Börger wrote:

  +This can be done automaticall with the use of php_error_docref. 
 Where the
  +docref parameter is either NULL or a manual reference describing the
  +error in detail. This must be an external url started by http://; or

(...)

That sounds a bit better :-)
Could you please also send a copy of your idea to [EMAIL PROTECTED]

marcus


--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /main main.c php.h php_globals.h

2002-08-09 Thread Adam Maccabee Trachtenberg

On Sat, 10 Aug 2002, Marcus Börger wrote:

 +This can be done automaticall with the use of php_error_docref. Where the
 +docref parameter is either NULL or a manual reference describing the
 +error in detail. This must be an external url started by http://; or
 +the name of a manual page without the  file extension but with an optional
 +target anchor. In case of NULL the reference is generated from the
 +function being executed:
 +
 +php_error_docref(function.name#error TSRMLS_CC, E_WHATEVER, Desc.);
 +
 +You may use php_error_docref1/2 to display the executed functionname
 +followed by one or two important parameters. For example file base
 +functions should display the name of the file opened:
 +
 +php_error_docref1(function.fopen, filename TSRMLS_CC, E_WHATEVER, 
 Desc.);
 +php_error_docref2(function.copy, file_source, file_dest, param2 
 TSRMLS_CC, E_WHATEVER, Desc.);

Marcus --

Looks good. Here is a suggested revision. I think it makes things a
little clearer to people who aren't familiar with the error handling
functions.

This can be done automatically using php_error_docref(). The first
parameter, docref, is either NULL or URL of a page in the PHP manual
describing the error in detail.

If you pass NULL, the reference is generated from the name of the
function being executed:

php_error_docref(function.name#error TSRMLS_CC, E_WHATEVER, Desc.);

If you pass a URL, it can either be a full URL beginning with
http://:

php_error_docref(http://www.php.net/manual/en/function.name#error.php; 
  TSRMLS_CC, E_WHATEVER, Desc.);

Or the name of a manual page without the file extension, but with an
optional target anchor:

php_error_docref(function.name#error TSRMLS_CC, E_WHATEVER, Desc.);

To display the one or two important parameters after the function
name, use php_error_docref1() or php_error_docref2(). For example,
file functions should display the name of the file opened:

php_error_docref1(function.fopen, filename
   TSRMLS_CC, EWHATEVER, Desc.);

php_error_docref2(function.fopen, file_source, file_destination 
   TSRMLS_CC, EWHATEVER, Desc.);

-adam

-- 
adam maccabee trachtenberg
[EMAIL PROTECTED]



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php