[Javascript] Try and Catch Question
John Warner
john at jwarner.com
Mon Mar 2 06:49:02 CST 2009
(e) allows your catch block to indentify the exception thrown. In some try
blocks more than one thing can go wrong, you might choose to ignore some
errors but want to respond to others.
John Warner
> -----Original Message-----
> From: javascript-bounces at lists.evolt.org [mailto:javascript-
> bounces at lists.evolt.org] On Behalf Of MEM
> Sent: Monday, March 02, 2009 7:16 AM
> To: javascript at lists.evolt.org
> Subject: [Javascript] Try and Catch Question
>
> Hi all, this is my first post, (so if anything is not right in the way I
> post, please let me know).
>
>
>
>
>
> When we use a try catch statement like this:
>
> try {
>
>
>
> } catch (e) {
>
>
>
> }
>
>
>
> Why do we need the e ?
>
>
>
> Well, I have seen also with err etc, so I presume the point is to have
> only something that represents the name error. But, what for? I mean,
> normally in this kind of statements I never see that e or err being
used
> for nothing, I see no e=ups error or something. So, what is that e
for?
>
>
>
>
>
> Thanks a lot,
>
> Márcio
>
> _______________________________________________
> Javascript mailing list
> Javascript at lists.evolt.org
> http://lists.evolt.org/mailman/listinfo/javascript
More information about the Javascript
mailing list