You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Jasvir Nagra <ja...@gmail.com> on 2009/08/26 19:08:05 UTC

Giving developers of gadgets better feedback from rewriting

Hi,

As the rewriters become more sophisticated (from example with osml and
caja), chances are developers will make mistakes.  What is the right way to
display errors back to the developer given that some warnings don't break
the display of gadgets but nevertheless ought to be communicated. In this
patch (http://codereview.appspot.com/109093) I am adding the caja warnings
to a comment block if the cajoling succeeds but I am sure other rewriters
also have this need.  An alternate thing would be to generate javascript
console log statements which check if there is a console.

A second problem I am facing is getting line number and offsets from the W3C
parser without which its hard to give good meaningful errors to
end-developers showing what went wrong, where and how to fix it.

Jasvir

-- 
Jasvir Nagra
http://www.cs.auckland.ac.nz/~jas

Re: Giving developers of gadgets better feedback from rewriting

Posted by Kevin Brown <et...@google.com>.
On Wed, Aug 26, 2009 at 10:08 AM, Jasvir Nagra <ja...@gmail.com> wrote:

> Hi,
>
> As the rewriters become more sophisticated (from example with osml and
> caja), chances are developers will make mistakes.  What is the right way to
> display errors back to the developer given that some warnings don't break
> the display of gadgets but nevertheless ought to be communicated. In this
> patch (http://codereview.appspot.com/109093) I am adding the caja warnings
> to a comment block if the cajoling succeeds but I am sure other rewriters
> also have this need.  An alternate thing would be to generate javascript
> console log statements which check if there is a console.
>
> A second problem I am facing is getting line number and offsets from the
> W3C
> parser without which its hard to give good meaningful errors to
> end-developers showing what went wrong, where and how to fix it.
>

I have a slight preference for emitting comments where applicable because
they can be inserted near the source of the error. Logging to the console
makes sense for things that happen in JS, but at present only caja touches
JS so it's probably not a general problem.


>
> Jasvir
>
> --
> Jasvir Nagra
> http://www.cs.auckland.ac.nz/~jas
>