Re: [Flashcoders] And another one re: try-catch-finally statements

2009-03-03 Thread Taka Kojima
Not saying it's a good thing, just laying out what it's accomplishing.

Seeing as Flash generates some pretty ugly looking runtime errors, I
usually like to display errors on my own terms, such as

catch (err:Error){
ErrorManager.showError("There was a problem communicating with the
server, please try again later");
 }

On Tue, Mar 3, 2009 at 7:19 PM, Dave Watts  wrote:
>> Now considering there is no code in the 'catch' block,
>> there can be absolutely no benefit whatsoever to using
>> try-catch-finally in the above instance.
>
> Well, it'll swallow the exception; that might be considered by some to
> be a benefit, although it's bad form to handle exceptions that way.
>
> Dave Watts, CTO, Fig Leaf Software
> http://www.figleaf.com/
>
> Fig Leaf Software provides the highest caliber vendor-authorized
> instruction at our training centers in Washington DC, Atlanta,
> Chicago, Baltimore, Northern Virginia, or on-site at your location.
> Visit http://training.figleaf.com/ for more information!
> - Show quoted text -
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] And another one re: try-catch-finally statements

2009-03-03 Thread Dave Watts
> Now considering there is no code in the 'catch' block,
> there can be absolutely no benefit whatsoever to using
> try-catch-finally in the above instance.

Well, it'll swallow the exception; that might be considered by some to
be a benefit, although it's bad form to handle exceptions that way.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] And another one re: try-catch-finally statements

2009-03-03 Thread Taka Kojima
Actually, in some instances that block of code might generate a
runtime error, in which case, to prevent Flash from outputting the
runtime error, there is a try catch block.



On Tue, Mar 3, 2009 at 7:02 PM, SJF  wrote:
> I have a head-cold (hence the possibly obvious answer to this question) and
> a block of code as such:
>
> function checkResponder(e:Event = null):void
> {
>  try
>  {
>  bPollingDatabase = true;
>  updateListArray();
>  }
>  catch (err:Error)
>  {
>  //
>  }
> }
>
> Now considering there is no code in the 'catch' block, there can be
> absolutely no benefit whatsoever to using try-catch-finally in the above
> instance.
>
> Is this correct?
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] And another one re: try-catch-finally statements

2009-03-03 Thread Eric E. Dolecki
I *think* that if that array is built up out of a URLRequest or something
and the URL to call is down, a finally would catch that and the error
wouldn't. But I'm not positive about that.

On Tue, Mar 3, 2009 at 10:02 PM, SJF  wrote:

> I have a head-cold (hence the possibly obvious answer to this question) and
> a block of code as such:
>
> function checkResponder(e:Event = null):void
> {
>  try
>  {
>  bPollingDatabase = true;
>  updateListArray();
>  }
>  catch (err:Error)
>  {
>  //
>  }
> }
>
> Now considering there is no code in the 'catch' block, there can be
> absolutely no benefit whatsoever to using try-catch-finally in the above
> instance.
>
> Is this correct?
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



-- 
http://ericd.net
Interactive design and development
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] And another one re: try-catch-finally statements

2009-03-03 Thread SJF
I have a head-cold (hence the possibly obvious answer to this question) and
a block of code as such:

function checkResponder(e:Event = null):void
{
 try
 {
  bPollingDatabase = true;
  updateListArray();
 }
 catch (err:Error)
 {
  //
 }
}

Now considering there is no code in the 'catch' block, there can be
absolutely no benefit whatsoever to using try-catch-finally in the above
instance.

Is this correct?
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders