Re: [PHP] try - catch is not so clear to me...

2009-04-14 Thread Bastien Koert
On Mon, Apr 13, 2009 at 11:34 PM, Lamp Lists lamp.li...@yahoo.com wrote: From: Marc Steinert li...@bithub.net To: Lamp Lists lamp.li...@yahoo.com Cc: php-general@lists.php.net Sent: Monday, April 13, 2009 11:27:08 AM Subject: Re: [PHP] try - catch

Re: [PHP] try - catch is not so clear to me...

2009-04-14 Thread Lamp Lists
From: Bastien Koert phps...@gmail.com To: Lamp Lists lamp.li...@yahoo.com Cc: Marc Steinert li...@bithub.net; 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

Re: [PHP] try - catch is not so clear to me...

2009-04-14 Thread Bastien Koert
[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: Contact

Re: [PHP] try - catch is not so clear to me...

2009-04-13 Thread Kyle Smith
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) ?php function

Re: [PHP] try - catch is not so clear to me...

2009-04-13 Thread Lamp Lists
From: Kyle Smith kyle.sm...@inforonics.com To: Lamp Lists lamp.li...@yahoo.com 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

Re: [PHP] try - catch is not so clear to me...

2009-04-13 Thread Lamp Lists
From: Lamp Lists lamp.li...@yahoo.com 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. I understand

Re: [PHP] try - catch is not so clear to me...

2009-04-13 Thread 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 functionality. Means, your methods do

RE: [PHP] try - catch is not so clear to me...

2009-04-13 Thread Bob McConnell
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

Re: [PHP] try - catch is not so clear to me...

2009-04-13 Thread Lamp Lists
From: Marc Steinert li...@bithub.net To: Lamp Lists lamp.li...@yahoo.com 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

Re: [PHP] Try{} Catch()

2008-01-01 Thread Martin Alterisio
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 unexpected

Re: [PHP] Try{} Catch()

2007-12-31 Thread Richard Lynch
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 you

Re: [PHP] Try{} Catch()

2007-12-23 Thread Martin Alterisio
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

Re: [PHP] Try{} Catch()

2007-12-23 Thread Al
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

RE: [PHP] Try{} Catch()

2007-12-23 Thread ked
- 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, have just not found a good use for it yet. Martin Alterisio wrote: It's not supposed

RE: [PHP] Try/Catch

2003-09-09 Thread --
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

Re: [PHP] Try/Catch

2003-09-09 Thread Curt Zirzow
* 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 returns an

RE: [PHP] Try/Catch

2003-09-08 Thread Jay Blanchard
[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:

Re: [PHP] try catch in php?

2001-02-26 Thread Jason Cox
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? Is there any equivalent java try catch

Re: [PHP] try - catch ?

2001-02-03 Thread Teodor Cimpoesu
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. --