162249 r=bzbarsky sr=darin Running external program - lack of decent error messages

This adds a useful error message in case the specified helper application does not exist
This commit is contained in:
cbiesinger%web.de 2003-07-22 17:25:02 +00:00
parent a81d14e92f
commit a1b49091f7
2 changed files with 9 additions and 0 deletions

View File

@ -41,4 +41,5 @@ launchError=%S could not be opened, because an unknown error occurred.\n\nSorry
diskFull=There is not enough room on the disk to save %S.\n\nRemove unnecessary files from the disk and try again, or try saving in a different location.
readOnly=%S could not be saved, because the disk, folder, or file is write-protected.\n\nWrite-enable the disk and try again, or try saving in a different location.
accessError=%S could not be saved, because you cannot change the contents of that folder.\n\nChange the folder properties and try again, or try saving in a different location.
helperAppNotFound=%S could not be opened, because the associated helper application does not exist. Change the association in your preferences.
title=Downloading %S

View File

@ -1438,6 +1438,14 @@ void nsExternalAppHandler::SendStatusChange(ErrorType type, nsresult rv, nsIRequ
msgId = NS_LITERAL_STRING("accessError");
break;
case NS_ERROR_FILE_NOT_FOUND:
// Helper app not found, let's verify this happened on launch
if (type == kLaunchError) {
msgId = NS_LITERAL_STRING("helperAppNotFound");
break;
}
// fall through
default:
// Generic read/write/launch error message.
switch(type)