зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1154606 - improve error in debugger when loading source fails r=jsantell
This commit is contained in:
Родитель
8991f43d1f
Коммит
1c9effd975
|
@ -422,7 +422,8 @@ let DebuggerView = {
|
|||
deferred.resolve([aSource, aText, aContentType]);
|
||||
},
|
||||
([, aError]) => {
|
||||
let msg = L10N.getStr("errorLoadingText") + DevToolsUtils.safeErrorString(aError);
|
||||
let url = aError;
|
||||
let msg = L10N.getFormatStr("errorLoadingText2", url);
|
||||
this._setEditorText(msg);
|
||||
Cu.reportError(msg);
|
||||
dumpn(msg);
|
||||
|
|
|
@ -36,7 +36,7 @@ function showBogusSource() {
|
|||
}
|
||||
|
||||
function testDebuggerLoadingError() {
|
||||
ok(gEditor.getText().includes(gL10N.getStr("errorLoadingText")),
|
||||
ok(gEditor.getText().includes(gL10N.getFormatStr("errorLoadingText2", "noSuchActor")),
|
||||
"The valid error loading message is displayed.");
|
||||
}
|
||||
|
||||
|
|
|
@ -214,10 +214,6 @@ breakpointMenuItem.deleteAll=Remove all breakpoints
|
|||
# yet.
|
||||
loadingText=Loading\u2026
|
||||
|
||||
# LOCALIZATION NOTE (errorLoadingText): The text that is displayed in the debugger
|
||||
# viewer when there is an error loading a file
|
||||
errorLoadingText=Error loading source:\n
|
||||
|
||||
# LOCALIZATION NOTE (errorLoadingText2): The text that is displayed in the debugger
|
||||
# viewer when there is an error loading a file
|
||||
errorLoadingText2=Error loading this URL: %S
|
||||
|
@ -325,4 +321,4 @@ variablesViewUninitialized=(uninitialized)
|
|||
variablesViewMissingArgs=(unavailable)
|
||||
|
||||
evalGroupLabel=Evaluated Sources
|
||||
anonymousSourcesLabel=Anonymous Sources
|
||||
anonymousSourcesLabel=Anonymous Sources
|
||||
|
|
|
@ -2522,7 +2522,7 @@ SourceActor.prototype = {
|
|||
reportError(aError, "Got an exception during SA_onSource: ");
|
||||
return {
|
||||
"from": this.actorID,
|
||||
"error": "loadSourceError",
|
||||
"error": this.url,
|
||||
"message": "Could not load the source for " + this.url + ".\n"
|
||||
+ DevToolsUtils.safeErrorString(aError)
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче