On Wed, Aug 26, 2009 at 10:08 AM, Jasvir Nagra <[email protected]> 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 >

