On Nov 11, 2:00 am, Rajat Gupta <[email protected]> wrote:
> Hi friends !
>
> Here is the code.
>
>     try{
>         alert(); // one argument is required for alert
>     }catch(e){
>             console.println( "e = " + e)
>             console.println( "e.name = " + e.name)
>     }
>
> or just call
>
>         alert(); // one argument is required for alert
>
> can we get the e object ?
> what is the type of e object ?
>
> Thanks
> Rajat
>
> ________________________________
> From: fel <[email protected]>
> To: [email protected]
> Sent: Mon, November 9, 2009 8:14:23 PM
> Subject: Re: Error handling - Help required !!
>
> On Nov 7, 11:41 am, Rajat Gupta <[email protected]> wrote:
>
> > Hi Support !
>
> > I am using rhino.
> > How i can do error handing using rhino ?
>
> > Question example -
> > I  had some method which is having some n number of input params, if one 
> > required param is undefine then i want to throw an error. For this I made a 
> > JS scriptable error object.
> > so how i can set this error object by using rhino error object ( if it does 
> > have) ?
>
> > please explain in detail.
> > I would be very thankful to you.
>
> > Thanks.
> > Rajat
>
> send the code
> _______________________________________________
> dev-tech-js-engine-rhino mailing list
> [email protected]https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino


maybe, you can create error objects, by using throw(), but I don't
think using exceptions is a good way of flow control.
(but that's just me).
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to