Examples of EvaluatorException


Examples of org.mozilla.javascript.EvaluatorException

                    if (fun == Scriptable.NOT_FOUND) {
                        throw new ResourceNotFoundException("Function \"javascript:" + funName + "()\" not found");
                    }
                    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 {
                updateSession(thrScope);
                if (cocoon != null) {
                    cocoon.popCallContext();
View Full Code Here

Examples of org.mozilla.javascript.EvaluatorException

                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 {
                updateSession(kScope);
                if (cocoon != null) {
                    cocoon.popCallContext();
View Full Code Here

Examples of org.mozilla.javascript.EvaluatorException

                                      sourceName, line,
                                      lineSrc, column);
      appendMessage(errMsg, sourceName, line, column);
      System.err.println(errMsg);
      // FIXME(SW): need to build a locatable extension to EvaluatorException
      return new EvaluatorException(this.message.toString());
  }
View Full Code Here

Examples of org.mozilla.javascript.EvaluatorException

            Object fun = global.get(method, global);
            // NOTE: Source and line arguments are nonsense in a call().
            //       Any way to make these arguments *sensible?
            if (fun == Scriptable.NOT_FOUND)
                throw new EvaluatorException("function " + method +
                                             " not found.", "none", 0);

            cx.setOptimizationLevel(-1);
            cx.setGeneratingDebug(false);
            cx.setGeneratingSource(false);
View Full Code Here

Examples of org.mozilla.javascript.EvaluatorException

                    throw new ResourceNotFoundException(
                            "Function \"javascript:" + funName + "()\" not found");
                }
                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 {
                updateSession(environment, thrScope);
                if (cocoon != null) {
                    cocoon.popCallContext();
                }
View Full Code Here

Examples of org.mozilla.javascript.EvaluatorException

            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 {
                updateSession(environment, kScope);
                cocoon.popCallContext();
                Context.exit();
            }
View Full Code Here

Examples of org.mozilla.javascript.EvaluatorException

            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)
            {
                logger.error(format(message, line, lineOffset));
View Full Code Here

Examples of org.mozilla.javascript.EvaluatorException

        }

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

Examples of railo.transformer.cfml.evaluator.EvaluatorException

    String ns=libTag.getTagLib().getNameSpaceAndSeparator();
      String ifName=ns+"if";
 
    // check if tag is direct inside if
    if(!ASMUtil.isParentTag(tag, TagIf.class)) {
      throw new EvaluatorException("Wrong Context, tag "+libTag.getFullName()+" must be direct inside a "+ifName+" tag");
    }
     
    // check if is there a elseif tag after this tag
    if(ASMUtil.hasSisterTagAfter(tag,"elseif"))
      throw new EvaluatorException("Wrong Context, tag cfelseif can't be after tag else");
    // check if tag else is unique
    if(ASMUtil.hasSisterTagWithSameName(tag))
     throw new EvaluatorException("Wrong Context, tag else must be once inside the tag if");
   
  }
View Full Code Here

Examples of yuicompressor.org.mozilla.javascript.EvaluatorException

                        }

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

                    // Close the input stream first, and then open the output stream,
                    // in case the output file should override the input file.
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.