[Javascript] Try and Catch Question

Alexander Freiria xandercoded at gmail.com
Tue Mar 3 15:50:20 CST 2009


I did not say that catch was a function, it (functions) similar to a
function receiving a variable/object and assigning the local variable, in
this case "whatever" to the incoming "thrown" variable/object...

On Tue, Mar 3, 2009 at 4:20 PM, Scott Reynen <scott at randomchaos.com> wrote:

> On [Mar 3], at [ Mar 3] 1:58 , Alexander Freiria wrote:
>
> >>> The "catch(whatever)" is obviously a function-call
> >>
> >>
> >> Uh, no. catch specifies where the program flow should go when throw
> >> is
> >> executed in the block preceding the catch.
> >
>
> > I second that. That is what the function of the catch is for...
>
>
> To be a bit pedantic, catch is not actually a function, despite having
> similar syntax.  You can assign a function to a variable, for example,
> but you'll get a syntax error if you try to assign catch to a variable.
>
> Peace,
> Scott
> _______________________________________________
> Javascript mailing list
> Javascript at lists.evolt.org
> http://lists.evolt.org/mailman/listinfo/javascript
>



More information about the Javascript mailing list