Not possible with current php
Bas Jobsen wrote:
Hi,
Running the code below, shows an errror in line 2 as expected.
How do i get the linenumber of the function call? 3 here.
function test($x){if($x!='a')trigger_error('error: call test with argument 1
equals a',E_USER_ERROR);}
test('b');
?>
Best
> -Original Message-
> From: Bas Jobsen [mailto:[EMAIL PROTECTED]
> Sent: 16 June 2003 14:39
>
> > I'm not sure that there is a way beyond this to show the
> line within the
> > function but I don't see that this would be necessary - at
> least not for
> > resolving errors.
>
> i'm buil
which produced the error.
>
> I'm not sure that there is a way beyond this to show the line within the
> function but I don't see that this would be necessary - at least not for
> resolving errors.
>
> HTH,
>
> Michael Egan
>
> -Original Message-
>
Use the predefined constant:
__LINE__
Regards,
Michael Egan
-Original Message-
From: Bas Jobsen [mailto:[EMAIL PROTECTED]
Sent: 16 June 2003 12:50
To: PHP General
Subject: [PHP] error reporting linenumber and filename[Scanned]
Hi,
Running the code below, shows an errror in line 2 as
Hi,
Running the code below, shows an errror in line 2 as expected.
How do i get the linenumber of the function call? 3 here.
Best regards,
Bas
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
5 matches
Mail list logo