Package org.mozilla.javascript

Examples of org.mozilla.javascript.EvaluatorException


                problems.add(problem);
            }

            public EvaluatorException runtimeError(String pMessage, String pFileName, int pLine, String pScript, int pColumn) {
                return new EvaluatorException(pMessage, pFileName, pLine, pScript, pColumn);
            }
View Full Code Here


            public EvaluatorException runtimeError(String message, String sourceName, int line, String lineSource,
                                                   int lineOffset)
            {
                error(message, sourceName, line, lineSource, lineOffset);

                return new EvaluatorException(message);
            }

            public void error(String message, String sourceName, int line, String lineSource, int lineOffset)
            {
                identifySource.run();
View Full Code Here

            }

            public EvaluatorException runtimeError(final String message, final String sourceName, final int line,
                    final String lineSource, final int lineOffset) {
                log(getMessage(sourceName, message, line, lineOffset), Project.MSG_ERR);
                return new EvaluatorException(message);
            }

            public void warning(final String message, final String sourceName, final int line, final String lineSource,
                    final int lineOffset) {
                log(getMessage(sourceName, message, line, lineOffset), Project.MSG_WARN);
View Full Code Here

        errorCount++;
    }

    public EvaluatorException runtimeError(String message, String sourceName, int line, String lineSource, int lineOffset) {
        error(message, sourceName, line, lineSource, lineOffset);
        throw new EvaluatorException(message, sourceName, line, lineSource, lineOffset);
    }
View Full Code Here

                    }

                    thrScope.setLock(true);
                    ScriptRuntime.call(context, fun, thrScope, funArgs, thrScope);
                } catch (JavaScriptException ex) {
                    EvaluatorException ee = Context.reportRuntimeError(
                                                                       ToolErrorReporter.getMessage("msg.uncaughtJSException",
                                                                                                    ex.getMessage()));
                    Throwable unwrapped = unwrap(ex);
                    if (unwrapped instanceof ProcessingException) {
                        throw (ProcessingException) unwrapped;
                    }
                    throw new CascadingRuntimeException(ee.getMessage(),
                                                        unwrapped);
                } catch (EcmaError ee) {
                    String msg = ToolErrorReporter.getMessage("msg.uncaughtJSException", ee.toString());
                    if (ee.getSourceName() != null) {
                        Context.reportRuntimeError(msg, ee.getSourceName(),
                                                   ee.getLineNumber(), ee.getLineSource(),
                                                   ee.getColumnNumber());
                    } else {
                        Context.reportRuntimeError(msg);
                    }
                    throw new CascadingRuntimeException(ee.getMessage(), ee);
                }
            } finally {
                thrScope.setLock(false);
                setSessionScope(thrScope);
                if (cocoon != null) {
View Full Code Here

                Object[] args = new Object[] {k, fom_wk};
                try {
                    ScriptableObject.callMethod(cocoon,
                                                "handleContinuation", args);
                } catch (JavaScriptException ex) {
                    EvaluatorException ee = Context.reportRuntimeError(
                                                                       ToolErrorReporter.getMessage("msg.uncaughtJSException",
                                                                                                    ex.getMessage()));
                    Throwable unwrapped = unwrap(ex);
                    if (unwrapped instanceof ProcessingException) {
                        throw (ProcessingException)unwrapped;
                    }
                    throw new CascadingRuntimeException(ee.getMessage(),
                                                        unwrapped);
                } catch (EcmaError ee) {
                    String msg = ToolErrorReporter.getMessage("msg.uncaughtJSException", ee.toString());
                    if (ee.getSourceName() != null) {
                        Context.reportRuntimeError(msg, ee.getSourceName(),
                                                   ee.getLineNumber(), ee.getLineSource(),
                                                   ee.getColumnNumber());
                    } else {
                        Context.reportRuntimeError(msg);
                    }
                    throw new CascadingRuntimeException(ee.getMessage(), ee);
                }
            } finally {
                kScope.setLock(false);
                setSessionScope(kScope);
                if (cocoon != null) {
View Full Code Here

        }

        public EvaluatorException runtimeError(String message, String sourceName,
            int line, String lineSource, int lineOffset) {
          error(message, sourceName, line, lineSource, lineOffset);
          return new EvaluatorException(message);
        }
      });

      compressor.compress(out, LINE_BREAK_POS, true, true,
          true, true);
View Full Code Here

        }

        public EvaluatorException runtimeError(String message, String sourceName,
            int line, String lineSource, int lineOffset) {
          error(message, sourceName, line, lineSource, lineOffset);
          return new EvaluatorException(message);
        }
      });

      compressor.compress(out, LINE_BREAK_POS, true, true,
          true, true);
View Full Code Here

   * @throws JavaScriptException if an error occurs
   */
  public Scriptable construct (Context cx, Scriptable scope,
             Object[] args)
      throws JavaScriptException {
      throw new EvaluatorException
    ("Function cannot be used as constructor");
  }
View Full Code Here

                                           String lineSource, int lineOffset) {
        String messageString =
                message + " in file " + sourceName + " at line " + line + " column " + lineOffset
                        + " in line :" + lineSource;
        log.error(messageString);
        return new EvaluatorException(message, sourceName, line, lineSource, lineOffset);
    }
View Full Code Here

TOP

Related Classes of org.mozilla.javascript.EvaluatorException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.