[snip]
>
>
>
> function send_confirmation_email($to, $subject, $body)
> {
> $headers ="MIME-Versin: 1.0\n" .
> "Content-type: text/plain; charset=ISO-8859-1;
> format=flowed\n" .
> "Content-Transfer-Encoding: 8bit\n" .
> "Reply-To:
From: Bastien Koert
To: Lamp Lists
Cc: Marc Steinert ; php-general@lists.php.net
Sent: Tuesday, April 14, 2009 8:11:04 AM
Subject: Re: [PHP] try - catch is not so clear to me...
On Mon, Apr 13, 2009 at 11:34 PM, Lamp Lists wrote
On Mon, Apr 13, 2009 at 11:34 PM, Lamp Lists wrote:
>
>
>
>
> From: Marc Steinert
> To: Lamp Lists
> Cc: php-general@lists.php.net
> Sent: Monday, April 13, 2009 11:27:08 AM
> Subject: Re: [PHP] try - catch is not so clear to me...
&g
From: Marc Steinert
To: Lamp Lists
Cc: php-general@lists.php.net
Sent: Monday, April 13, 2009 11:27:08 AM
Subject: Re: [PHP] try - catch is not so clear to me...
Basically try-catch gives you the ability to handle errors outside a class or
method scope, by
From: Marc Steinert
> Basically try-catch gives you the ability to handle errors
> outside a class or method scope, by the
> calling instance.
> This comes in handy, if you are programming in an object
> orientated way and thus enables you to
> seperate error handling from the rest of your funct
Basically try-catch gives you the ability to handle errors outside a class or method scope, by the
calling instance.
This comes in handy, if you are programming in an object orientated way and thus enables you to
seperate error handling from the rest of your functionality.
Means, your methods do
>
> From: Lamp Lists
> To: php-general@lists.php.net
> Sent: Monday, April 13, 2009 9:29:16 AM
> Subject: [PHP] try - catch is not so clear to me...
>
> hi to all!
>
> actually, the statement in the Subject line is not 100% correct.
From: Kyle Smith
To: Lamp Lists
Cc: php-general@lists.php.net
Sent: Monday, April 13, 2009 9:52:36 AM
Subject: Re: [PHP] try - catch is not so clear to me...
Lamp Lists wrote:
hi to all!
actually, the statement in the Subject line is not 100% correct. I
Lamp Lists wrote:
hi to all!
actually, the statement in the Subject line is not 100% correct. I understand
the purpose and how it works (at least I think I understand :-)) but to me it's
so complicated way?
let's take a look in example from php.net(http://us3.php.net/try)
getMessage(), "\n"
hi to all!
actually, the statement in the Subject line is not 100% correct. I understand
the purpose and how it works (at least I think I understand :-)) but to me it's
so complicated way?
let's take a look in example from php.net(http://us3.php.net/try)
getMessage(), "\n";
}
// Continue exe
2007/12/31, Richard Lynch <[EMAIL PROTECTED]>:
>
> On Sun, December 23, 2007 3:50 pm, Martin Alterisio wrote:
> > It's not supposed to be practical, it's just a way to handle errors.
> > You
> > shouldn't rely on try/catch for algorithm implementation.
> >
> > You create exceptions for errors and u
On Sun, December 23, 2007 3:50 pm, Martin Alterisio wrote:
> It's not supposed to be practical, it's just a way to handle errors.
> You
> shouldn't rely on try/catch for algorithm implementation.
>
> You create exceptions for errors and unexpected behavior. Then in some
> other
> part of the system
total message : {$err}";
}
> -Original Message-
> From: Al [mailto:[EMAIL PROTECTED]
> Sent: Monday, December 24, 2007 5:59 AM
> To: php-general@lists.php.net
> Subject: Re: [PHP] Try{} Catch()
>
> I understand it's intended use and how to use it, hav
I understand it's intended use and how to use it, have just not found a good use
for it yet.
Martin Alterisio wrote:
It's not supposed to be practical, it's just a way to handle errors. You
shouldn't rely on try/catch for algorithm implementation.
You create exceptions for errors and unexpec
It's not supposed to be practical, it's just a way to handle errors. You
shouldn't rely on try/catch for algorithm implementation.
You create exceptions for errors and unexpected behavior. Then in some other
part of the system you use try/catch to prevent the code from terminating
abruptly. You ca
Try() and Catch() seems neat; but, I've not found it to be very practical.
Anyone using it? How?
Al...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
* Thus wrote -- ([EMAIL PROTECTED]):
> Hello Jay,
>
>Yes, I´m running PHP5.
>And in my code you can see that the exception is
> throwed in an a call to a methode from an aggregated
> object in a suclassed one ($this->curl->GET()). The
> GET() methode throws the excpetion if curl_exec
> ret
Hello Jay,
Yes, I´m running PHP5.
And in my code you can see that the exception is
throwed in an a call to a methode from an aggregated
object in a suclassed one ($this->curl->GET()). The
GET() methode throws the excpetion if curl_exec
returns an error.
But one would expect that the exce
[snip]
Try/Catch
Well, may question is about the Scope of Throwed
Execeptions.
[/snip]
What version of PHP are you running? Only V5 has this kind of exception
handling. See http://www.php.net/zend-engine-2.php
HTH!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http:/
Well, may question is about the Scope of Throwed
Execeptions. Look my example:
I have something like this:
//...cut...
try {
$res =
$this->curl->GET($this->url[0]);
} catch (Exception $e) {
one thing i really love in perl is the block eval {} structure, which is
similar to try/catch/throw in java and other languages.
i'm missing it a lot in php. is there a way to simulate it?
for instance, say i have a bunch of database commands. in perl, i would do
something like (pseudocode):
he extensive error handling that Java does. It's a
> bit more like C.
>
> Jason
>
> - Original Message -
> From: "Jeff" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, February 26, 2001 6:30 PM
> Subject: [PHP] try catch in
No, PHP doesn't have the extensive error handling that Java does. It's a
bit more like C.
Jason
- Original Message -
From: "Jeff" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 26, 2001 6:30 PM
Subject: [PHP] try catch in php?
&g
Is there any equivalent java try catch syntax in php ?
Thanks,
Jeff
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
Alain Fontaine wrote:
>
> Hi,
>
> Are there any plans on implementing something like Exception handling into
> future versions of PHP? That would be great.
>
I do remember Zeev saying it is considered for future implementation. I
don't
remember if it was on this list or php-dev one, though.
Hi,
Are there any plans on implementing something like Exception handling into
future versions of PHP? That would be great.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list admini
26 matches
Mail list logo