Search in sources :

Example 6 with JavaScriptException

use of com.google.gwt.core.client.JavaScriptException in project gerrit by GerritCodeReview.

the class PluginName method findCallerUrl.

String findCallerUrl() {
    JavaScriptException err = makeException();
    if (hasStack(err)) {
        return PluginNameMoz.getUrl(err);
    }
    String baseUrl = baseUrl();
    StackTraceElement[] trace = getTrace(err);
    for (int i = trace.length - 1; i >= 0; i--) {
        String u = trace[i].getFileName();
        if (u != null && u.startsWith(baseUrl)) {
            return u;
        }
    }
    return UNKNOWN;
}
Also used : JsArrayString(com.google.gwt.core.client.JsArrayString) JavaScriptException(com.google.gwt.core.client.JavaScriptException)

Aggregations

JavaScriptException (com.google.gwt.core.client.JavaScriptException)6 JavaScriptObject (com.google.gwt.core.client.JavaScriptObject)2 JsonParserException (playn.core.json.JsonParserException)2 JsArrayString (com.google.gwt.core.client.JsArrayString)1 ReadyStateChangeHandler (com.google.gwt.xhr.client.ReadyStateChangeHandler)1 XMLHttpRequest (com.google.gwt.xhr.client.XMLHttpRequest)1 RequirejsConfig (org.eclipse.che.plugin.requirejs.ide.conf.RequirejsConfig)1 VoidServerRequestCallback (org.rstudio.studio.client.server.VoidServerRequestCallback)1 SnippetData (org.rstudio.studio.client.workbench.snippets.model.SnippetData)1