RE: [Flashcoders] Try... catch......

2009-05-10 Thread Mario Gonzalez
...@ipauland.com] Sent: Saturday, May 09, 2009 11:27 AM To: Flash Coders List Subject: Re: [Flashcoders] Try... catch.. I regret my one word answer because while it answers the question, there's a question of good practice to consider. Putting return ball; as the last line doesn't really help

Re: [Flashcoders] Try... catch......

2009-05-10 Thread Juan Pablo Califano
...@chattyfig.figleaf.com] On Behalf Of Paul Andrews [ p...@ipauland.com] Sent: Saturday, May 09, 2009 11:27 AM To: Flash Coders List Subject: Re: [Flashcoders] Try... catch.. I regret my one word answer because while it answers the question, there's a question of good practice to consider

Re: [Flashcoders] Try... catch......

2009-05-09 Thread Hans Wichman
Hi, yup either public function myBall( value:int ):Ball { var ball:Ball try{ //my code goes here. return ball; } catch (e:TypeError ){ trace(Whoops); } return null;

Re: [Flashcoders] Try... catch......

2009-05-09 Thread ACE Flash
Hi Hans, Thanks for the code :) I have one more question for the script below 1. if catch the TypeError, does the last line = return ball will execute? Thanks a lot public function myBall( value:int ):Ball { var ball:Ball = null; try{ //my

Re: [Flashcoders] Try... catch......

2009-05-09 Thread Paul Andrews
Yes. - Original Message - From: ACE Flash acefl...@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Saturday, May 09, 2009 3:28 PM Subject: Re: [Flashcoders] Try... catch.. Hi Hans, Thanks for the code :) I have one more question for the script below

Re: [Flashcoders] Try... catch......

2009-05-09 Thread Paul Andrews
Sent: Saturday, May 09, 2009 4:17 PM Subject: Re: [Flashcoders] Try... catch.. Yes. - Original Message - From: ACE Flash acefl...@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Saturday, May 09, 2009 3:28 PM Subject: Re: [Flashcoders] Try... catch

Re: [Flashcoders] try-catch-finally ...

2009-03-04 Thread Weyert de Boer
Sure. Reasonable good practice to catch exceptions. I normally use it for things like catch the exception and try it once again and if it fails for the second time. I will show an error message or try secondary option. Technically, it's good practice/professional to use try-catch-finally