Add debug error message for potential fatal error

This commit is contained in:
mkaply%us.ibm.com 2006-01-19 17:45:53 +00:00
Родитель 26b678e428
Коммит cd382ea86e
1 изменённых файлов: 12 добавлений и 2 удалений

Просмотреть файл

@ -38,6 +38,7 @@ var currentconfigpath;
var haveplugins = false;
var havesearchplugins = false;
var configarray = new Array();
var debug = true;
var gPrefBranch = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
@ -1424,8 +1425,17 @@ function CCKCopyFile(source, destination)
try {
destfile.remove(false);
} catch (ex) {}
sourcefile.copyTo(destination, "");
try {
sourcefile.copyTo(destination, "");
} catch (ex) {
if (debug) {
var bundle = document.getElementById("bundle_cckwizard");
gPromptService.alert(window, bundle.getString("windowTitle"),
ex + "\n\nSource: " + source + "\n\nDestination: " + destination.path );
}
throw("Stopping Javascript execution");
}
return true;
}