Subject | RE: [firebird-php] how to capture last exception (from stored procedure) in PHP ? |
---|---|
Author | Alan McDonald |
Post date | 2004-11-08T13:15:03Z |
Just as an aside - you either use SUSPEND or EXIT but not both.
Use SUSPEND when you wish to return more than one value, EXIT when there is
only one value to return.
It look here like you suspend the value then continue to raise the exception
until you exit. So you are confusing the return value expectations.
Alan
-----Original Message-----
From: hamacker [mailto:sirhamacker@...]
Sent: Monday, November 08, 2004 11:56 PM
To: firebird-php@yahoogroups.com
Subject: Re: [firebird-php] how to capture last exception (from stored
procedure) in PHP ?
OK.
But I put only an example, my problem is that ibase_errmsg() allways
returning empty string and I need to capture the last exception error.
I can correct a prior example, try :
if (:ncount > 0 ) then
begin
result_value=0;
suspend;
EXCEPTION ERROR_SP_GENERIC 'You cant delete existing tickets
dependences';
EXIT;
end
and the same problem, I can capture in PHP the message "You cant delete
existing tickets dependences';
This message are displayed only if "error_reporting = E_ALL &
~E_NOTICE" in php.ini and ibase_errmsg() allways returning empty string.
My PHP is php4-4.3.6 / Conectiva Linux 10 (kernel 2.6.5)
[]'s
Alan McDonald wrote:
ADVERTISEMENT
----------------------------------------------------------------------------
--
Yahoo! Groups Links
a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-php/
b.. To unsubscribe from this group, send an email to:
firebird-php-unsubscribe@yahoogroups.com
c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]
Use SUSPEND when you wish to return more than one value, EXIT when there is
only one value to return.
It look here like you suspend the value then continue to raise the exception
until you exit. So you are confusing the return value expectations.
Alan
-----Original Message-----
From: hamacker [mailto:sirhamacker@...]
Sent: Monday, November 08, 2004 11:56 PM
To: firebird-php@yahoogroups.com
Subject: Re: [firebird-php] how to capture last exception (from stored
procedure) in PHP ?
OK.
But I put only an example, my problem is that ibase_errmsg() allways
returning empty string and I need to capture the last exception error.
I can correct a prior example, try :
if (:ncount > 0 ) then
begin
result_value=0;
suspend;
EXCEPTION ERROR_SP_GENERIC 'You cant delete existing tickets
dependences';
EXIT;
end
and the same problem, I can capture in PHP the message "You cant delete
existing tickets dependences';
This message are displayed only if "error_reporting = E_ALL &
~E_NOTICE" in php.ini and ibase_errmsg() allways returning empty string.
My PHP is php4-4.3.6 / Conectiva Linux 10 (kernel 2.6.5)
[]'s
Alan McDonald wrote:
> when the exception fires, it does not continue on to the valueassignnment
> or the suspend so don;t test for the result value only the true statusof
> the querymessage?
> Alan
> -----Original Message-----
> From: hamacker [mailto:sirhamacker@...]
> Sent: Saturday, November 06, 2004 1:30 AM
> To: firebird-php@yahoogroups.com
> Subject: [firebird-php] how to capture last exception (from stored
> procedure) in PHP ?
>
>
> Hi guys,
>
> I have one store procedure that some part is :
> if (:ncount > 0 ) then
> begin
> EXCEPTION ERROR_SP_GENERIC 'You cant delete existing tickets
> dependences';
> result_value=0;
> suspend;
> EXIT;
> end
>
> In PHP, the error is OK, but none message.
> I try like this :
> if ($my_sp->RESULT_VALUE == 0) {
> echo "Ops! Error :<br>";
> echo ibase_errmsg(); }
>
> But ibase_errmsg() always returning nothing.
> There is a solution or workaround for this problem ?
>
> There are some functions in PHP that returning the last warning
>--
>
> --
> []'s
>
> Yahoo! Groups Sponsor
>
> Get unlimited calls to
>
> U.S./Canada
>
>
>
>
> --------------------------------------------------------------------------
> --Service.
> Yahoo! Groups Links
>
> a.. To visit your group on the web, go to:
> http://groups.yahoo.com/group/firebird-php/
>
> b.. To unsubscribe from this group, send an email to:
> firebird-php-unsubscribe@yahoogroups.com
>
> c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>Yahoo! Groups Sponsor
>
>
> [Non-text portions of this message have been removed]
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
ADVERTISEMENT
----------------------------------------------------------------------------
--
Yahoo! Groups Links
a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-php/
b.. To unsubscribe from this group, send an email to:
firebird-php-unsubscribe@yahoogroups.com
c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]