org.apache.cocoon.components.flow.javascript
Class JSErrorReporter

java.lang.Object
  extended byorg.apache.cocoon.util.AbstractLogEnabled
      extended byorg.apache.cocoon.components.flow.javascript.JSErrorReporter
All Implemented Interfaces:
org.mozilla.javascript.ErrorReporter

public class JSErrorReporter
extends org.apache.cocoon.util.AbstractLogEnabled
implements org.mozilla.javascript.ErrorReporter

Implements a Rhino JavaScript ErrorReporter. Like ToolErrorReporter but logs to supplied logger instead of stdout

Version:
$Id: JSErrorReporter.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Constructor Summary
JSErrorReporter()
           
 
Method Summary
 void error(String message, String sourceName, int line, String lineSrc, int column)
           
 org.mozilla.javascript.EvaluatorException runtimeError(String message, String sourceName, int line, String lineSrc, int column)
           
 void warning(String message, String sourceName, int line, String lineSrc, int column)
           
 
Methods inherited from class org.apache.cocoon.util.AbstractLogEnabled
getLogger, setLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSErrorReporter

public JSErrorReporter()
Method Detail

error

public void error(String message,
                  String sourceName,
                  int line,
                  String lineSrc,
                  int column)
Specified by:
error in interface org.mozilla.javascript.ErrorReporter

warning

public void warning(String message,
                    String sourceName,
                    int line,
                    String lineSrc,
                    int column)
Specified by:
warning in interface org.mozilla.javascript.ErrorReporter

runtimeError

public org.mozilla.javascript.EvaluatorException runtimeError(String message,
                                                              String sourceName,
                                                              int line,
                                                              String lineSrc,
                                                              int column)
Specified by:
runtimeError in interface org.mozilla.javascript.ErrorReporter


Copyright © 1999-2008 The Apache Software Foundation. All Rights Reserved.