Codota Logo
EcmaError.lineSource
Code IndexAdd Codota to your IDE (free)

How to use
lineSource
method
in
org.mozilla.javascript.EcmaError

Best Java code snippets using org.mozilla.javascript.EcmaError.lineSource (Showing top 8 results out of 315)

  • Common ways to obtain EcmaError
private void myMethod () {
EcmaError e =
  • Codota IconString str;ScriptRuntime.typeError0(str)
  • Codota IconString str;String arg1;ScriptRuntime.typeError1(str, arg1)
  • Codota IconString str;ScriptRuntime.typeError(str)
  • Smart code suggestions by Codota
}
origin: io.apigee/rhino

/**
 * @deprecated Use {@link RhinoException#lineSource()} from the super class.
 */
public String getLineSource() {
  return lineSource();
}
origin: rhino/js

/**
 * @deprecated Use {@link RhinoException#lineSource()} from the super class.
 */
public String getLineSource() {
  return lineSource();
}
origin: com.github.tntim96/rhino

/**
 * @deprecated Use {@link RhinoException#lineSource()} from the super class.
 */
public String getLineSource() {
  return lineSource();
}
origin: ro.isdc.wro4j/rhino

/**
 * @deprecated Use {@link RhinoException#lineSource()} from the super class.
 */
public String getLineSource() {
  return lineSource();
}
origin: com.sun.phobos/phobos-rhino

/**
 * @deprecated Use {@link RhinoException#lineSource()} from the super class.
 */
public String getLineSource() {
  return lineSource();
}
origin: geogebra/geogebra

/**
 * @deprecated Use {@link RhinoException#lineSource()} from the super class.
 */
@Deprecated
public String getLineSource() {
  return lineSource();
}
origin: alexo/wro4j

/**
 * Creates a more detailed message based on {@link RhinoException} thrown by rhino execution. The message will contain
 * a detailed description of the problem by inspecting the JSON value provided by exception.
 * 
 * @param e
 *          {@link RhinoException} thrown by rhino execution.
 * @return detailed string message.
 */
public static String createExceptionMessage(final RhinoException e) {
 StringBuffer message = new StringBuffer("Could not execute the script because: \n");
 if (e instanceof JavaScriptException) {
  message.append(toJson(((JavaScriptException) e).getValue()));
 } else if (e instanceof EcmaError) {
  final EcmaError ecmaError = (EcmaError) e;
  message.append(String.format("Error message: %s at line: %s. \nSource: %s", ecmaError.getErrorMessage(),
    ecmaError.lineNumber(), ecmaError.lineSource()));
 } else {
  message.append(e.getMessage());
 }
 return message.toString();
}

origin: ro.isdc.wro4j/wro4j-extensions

/**
 * Creates a more detailed message based on {@link RhinoException} thrown by rhino execution. The message will contain
 * a detailed description of the problem by inspecting the JSON value provided by exception.
 * 
 * @param e
 *          {@link RhinoException} thrown by rhino execution.
 * @return detailed string message.
 */
public static String createExceptionMessage(final RhinoException e) {
 StringBuffer message = new StringBuffer("Could not execute the script because: \n");
 if (e instanceof JavaScriptException) {
  message.append(toJson(((JavaScriptException) e).getValue()));
 } else if (e instanceof EcmaError) {
  final EcmaError ecmaError = (EcmaError) e;
  message.append(String.format("Error message: %s at line: %s. \nSource: %s", ecmaError.getErrorMessage(),
    ecmaError.lineNumber(), ecmaError.lineSource()));
 } else {
  message.append(e.getMessage());
 }
 return message.toString();
}
 
org.mozilla.javascriptEcmaErrorlineSource

Popular methods of EcmaError

  • lineNumber
  • sourceName
  • columnNumber
  • getErrorMessage
    Gets the message corresponding to the error. See ECMA edition 3, 15.11.7.10.
  • <init>
  • getName
    Gets the name of the error. ECMA edition 3 defines the following errors: EvalError, RangeError, Refe
  • recordErrorOrigin
  • getMessage
  • details
  • toString

Popular in Java

  • Running tasks concurrently on multiple threads
  • setScale (BigDecimal)
  • onCreateOptionsMenu (Activity)
  • orElseThrow (Optional)
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Permission (java.security)
    Abstract class for representing access to a system resource. All permissions have a name (whose inte
  • HashSet (java.util)
    This class implements the Set interface, backed by a hash table (actually a HashMap instance). It m
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now