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:

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

2009-04-14 Thread Lamp Lists
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

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 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

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

2009-04-13 Thread Lamp Lists
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

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 funct

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 Lamp Lists
> > 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.

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

2009-04-13 Thread Lamp Lists
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

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) getMessage(), "\n"

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

2009-04-13 Thread Lamp Lists
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

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 u

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

RE: [PHP] Try{} Catch()

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

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 unexpec

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 ca

[PHP] Try{} Catch()

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

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 > ret

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 exce

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: http:/

[PHP] Try/Catch

2003-09-08 Thread --
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) {

[PHP] try/catch type constructs?

2002-02-01 Thread Jon Drukman
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):

Re: [PHP] try catch in php?

2001-03-22 Thread elias
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

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? &g

[PHP] try catch in php?

2001-02-26 Thread Jeff
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]

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.

[PHP] try - catch ?

2001-02-03 Thread Alain Fontaine
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