public EvaluatorException runtimeError(String message, String sourceName, int line, String lineSource, int lineOffset) { return new EvaluatorException(message, sourceName, line, lineSource, lineOffset); }
/** * Resume execution of a suspended generator. * @param cx The current context * @param scope Scope for the parent generator function * @param operation The resumption operation (next, send, etc.. ) * @param state The generator state (has locals, stack, etc.) * @param value The return value of yield (if required). * @return The next yielded value (if any) */ public Object resumeGenerator(Context cx, Scriptable scope, int operation, Object state, Object value) { throw new EvaluatorException("resumeGenerator() not implemented"); }
public EvaluatorException runtimeError(String message, String sourceURI, int line, String lineText, int lineOffset) { if (chainedReporter != null) { return chainedReporter.runtimeError( message, sourceURI, line, lineText, lineOffset); } else { return new EvaluatorException( message, sourceURI, line, lineText, lineOffset); } } }
/** * Logs an error. * * @param message the message to be displayed * @param sourceName the name of the source file * @param line the line number * @param lineSource the source code that failed * @param lineOffset the line offset */ @Override public void error(final String message, final String sourceName, final int line, final String lineSource, final int lineOffset) { LOG.error(format("error", message, sourceName, line, lineSource, lineOffset)); throw new EvaluatorException(message, sourceName, line, lineSource, lineOffset); }
/** * Logs an error. * * @param message the message to be displayed * @param sourceName the name of the source file * @param line the line number * @param lineSource the source code that failed * @param lineOffset the line offset */ public void error( final String message, final String sourceName, final int line, final String lineSource, final int lineOffset) { LOG.error(format("error", message, sourceName, line, lineSource, lineOffset)); throw new EvaluatorException(message, sourceName, line, lineSource, lineOffset); }
/** * Logs an error. * * @param message the message to be displayed * @param sourceName the name of the source file * @param line the line number * @param lineSource the source code that failed * @param lineOffset the line offset */ public void error( final String message, final String sourceName, final int line, final String lineSource, final int lineOffset) { LOG.error(format("error", message, sourceName, line, lineSource, lineOffset)); throw new EvaluatorException(message, sourceName, line, lineSource, lineOffset); }
/** * Logs a runtime error. * * @param message the message to be displayed * @param sourceName the name of the source file * @param line the line number * @param lineSource the source code that failed * @param lineOffset the line offset * @return an evaluator exception */ @Override public EvaluatorException runtimeError( final String message, final String sourceName, final int line, final String lineSource, final int lineOffset) { LOG.error(format("runtimeError", message, sourceName, line, lineSource, lineOffset)); return new EvaluatorException(message, sourceName, line, lineSource, lineOffset); }
/** * Logs an error. * * @param message the message to be displayed * @param sourceName the name of the source file * @param line the line number * @param lineSource the source code that failed * @param lineOffset the line offset */ public void error( final String message, final String sourceName, final int line, final String lineSource, final int lineOffset) { LOG.error(format("error", message, sourceName, line, lineSource, lineOffset)); throw new EvaluatorException(message, sourceName, line, lineSource, lineOffset); }
/** * Logs a runtime error. * * @param message the message to be displayed * @param sourceName the name of the source file * @param line the line number * @param lineSource the source code that failed * @param lineOffset the line offset * @return an evaluator exception */ public EvaluatorException runtimeError( final String message, final String sourceName, final int line, final String lineSource, final int lineOffset) { LOG.error(format("runtimeError", message, sourceName, line, lineSource, lineOffset)); return new EvaluatorException(message, sourceName, line, lineSource, lineOffset); }
/** * Logs a runtime error. * * @param message the message to be displayed * @param sourceName the name of the source file * @param line the line number * @param lineSource the source code that failed * @param lineOffset the line offset * @return an evaluator exception */ public EvaluatorException runtimeError( final String message, final String sourceName, final int line, final String lineSource, final int lineOffset) { LOG.error(format("runtimeError", message, sourceName, line, lineSource, lineOffset)); return new EvaluatorException(message, sourceName, line, lineSource, lineOffset); }
/** * Logs a runtime error. * * @param message the message to be displayed * @param sourceName the name of the source file * @param line the line number * @param lineSource the source code that failed * @param lineOffset the line offset * @return an evaluator exception */ public EvaluatorException runtimeError( final String message, final String sourceName, final int line, final String lineSource, final int lineOffset) { LOG.error(format("runtimeError", message, sourceName, line, lineSource, lineOffset)); return new EvaluatorException(message, sourceName, line, lineSource, lineOffset); }
/** * Logs an error. * * @param message the message to be displayed * @param sourceName the name of the source file * @param line the line number * @param lineSource the source code that failed * @param lineOffset the line offset */ @Override public void error(final String message, final String sourceName, final int line, final String lineSource, final int lineOffset) { if (LOG.isErrorEnabled()) { LOG.error(format("error", message, sourceName, line, lineSource, lineOffset)); } throw new EvaluatorException(message, sourceName, line, lineSource, lineOffset); }
/** * Logs a runtime error. * * @param message the message to be displayed * @param sourceName the name of the source file * @param line the line number * @param lineSource the source code that failed * @param lineOffset the line offset * @return an evaluator exception */ @Override public EvaluatorException runtimeError( final String message, final String sourceName, final int line, final String lineSource, final int lineOffset) { if (LOG.isErrorEnabled()) { LOG.error(format("runtimeError", message, sourceName, line, lineSource, lineOffset)); } return new EvaluatorException(message, sourceName, line, lineSource, lineOffset); }
/** * Report an error using the error reporter for the current thread. * * @param message the error message to report * @param sourceName a string describing the source, such as a filename * @param lineno the starting line number * @param lineSource the text of the line (may be null) * @param lineOffset the offset into lineSource where problem was detected * @see net.sourceforge.htmlunit.corejs.javascript.ErrorReporter */ public static void reportError(String message, String sourceName, int lineno, String lineSource, int lineOffset) { Context cx = getCurrentContext(); if (cx != null) { cx.getErrorReporter().error(message, sourceName, lineno, lineSource, lineOffset); } else { throw new EvaluatorException(message, sourceName, lineno, lineSource, lineOffset); } }
/** * Report a runtime error using the error reporter for the current thread. * * @param message the error message to report * @param sourceName a string describing the source, such as a filename * @param lineno the starting line number * @param lineSource the text of the line (may be null) * @param lineOffset the offset into lineSource where problem was detected * @return a runtime exception that will be thrown to terminate the * execution of the script * @see net.sourceforge.htmlunit.corejs.javascript.ErrorReporter */ public static EvaluatorException reportRuntimeError(String message, String sourceName, int lineno, String lineSource, int lineOffset) { Context cx = getCurrentContext(); if (cx != null) { return cx.getErrorReporter(). runtimeError(message, sourceName, lineno, lineSource, lineOffset); } else { throw new EvaluatorException(message, sourceName, lineno, lineSource, lineOffset); } }
beforeOption = (HtmlOption) ((HTMLOptionElement) beforeOptionObject).getDomNodeOrDie(); if (beforeOption.getParentNode() != htmlSelect_) { throw new EvaluatorException("Unknown option.");
beforeOption = (HtmlOption) ((HTMLOptionElement) beforeOptionObject).getDomNodeOrDie(); if (beforeOption.getParentNode() != htmlSelect_) { throw new EvaluatorException("Unknown option.");