Catching errors in inline js (was: Re: [amber-lang] <jscode> - should it be free or sanitized?)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Catching errors in inline js (was: Re: [amber-lang] <jscode> - should it be free or sanitized?)

Herby Vojčík
Herby Vojčík wrote:

> Hello,
>
> I'd like to ask for the policy on use of <inlineJs()> - for now, it is
> included as-is. My question is - should this be left as-is, by which
> people can create templates of sort (dislike this, too much cons, pros
> are questionable):
>
> <for (var i=1; i<100; ++i) {>
> "smalltalk code"
> <}>
>
> or it should be flyweightly sanitized by putting semicolon(s) in front
> and in back of them (I like this alternative; I do it in ImpCompiler)?

I would even like to sanitize it a little more buy putting in between
';;;try{' and ';;;}catch(e){/*process the error*/}' and the error
processing could wrap the error and hand it to smalltalk for handling if
it sees fit.

> Herby