congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
EcmaError.sourceName
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: com.sun.phobos/phobos-rhino

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

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

/**
 * @deprecated Use {@link RhinoException#sourceName()} from the super class.
 */
public String getSourceName()
{
  return sourceName();
}
origin: io.apigee/rhino

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

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

/**
 * @deprecated Use {@link RhinoException#sourceName()} from the super class.
 */
@Deprecated
public String getSourceName()
{
  return sourceName();
}
origin: ca.carleton.gcrc/nunaliit2-javascript

public Object evaluateJavascript(String javascript) throws Exception {
  try {
    Object result = cx.evaluateString(scope, javascript, "main", 1, null);
    return result;
    
  } catch(EcmaError e) {
    for(JavascriptRunnerListener listener : listeners){
      listener.runtimeError(e.details(), e.sourceName(), e.lineNumber());
    }
    throw e;
  }
}

origin: org.apache.cocoon/cocoon-flowscript-impl

  public Location getLocation(Object obj, String description) {
    if (obj instanceof EcmaError) {
      EcmaError ex = (EcmaError)obj;
      if (ex.sourceName() != null) {
        return new LocationImpl(ex.getName(), ex.sourceName(), ex.lineNumber(), ex.columnNumber());
      } else {
        return Location.UNKNOWN;
      }

    } else if (obj instanceof JavaScriptException) {
      JavaScriptException ex = (JavaScriptException)obj;
      if (ex.sourceName() != null) {
        return new LocationImpl(description, ex.sourceName(), ex.lineNumber(), -1);
      } else {
        return Location.UNKNOWN;
      }
    }
    
    return null;
  } 
};
origin: org.geoserver.script/gs-script-js

@Override
public Object eval(Reader reader, ScriptContext context) throws ScriptException {
  String filename = (String) get(ScriptEngine.FILENAME);
  if (filename == null) {
    filename = "<Unknown Source>";
  }
  Object result;
  EngineScope scope = new EngineScope(context);
  Global global = getGlobal();
  scope.setParentScope(global);
  scope.setPrototype(global);
  Context cx = enterContext();
  try {
    scope.put("exports", scope, cx.newObject(global));
    result = cx.evaluateReader(scope, reader, filename, 1, null);
  } catch (EcmaError e) {
    throw new ScriptException(
        e.getMessage(), e.sourceName(), e.lineNumber(), e.columnNumber());
  } catch (Exception e) {
    throw new ScriptException(e);
  } finally {
    Context.exit();
  }
  return result;
}
org.mozilla.javascriptEcmaErrorsourceName

Popular methods of EcmaError

  • lineNumber
  • 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
  • lineSource
  • recordErrorOrigin
  • getMessage
  • details
  • toString

Popular in Java

  • Finding current android device location
  • getContentResolver (Context)
  • compareTo (BigDecimal)
  • onCreateOptionsMenu (Activity)
  • Kernel (java.awt.image)
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now