From 6a94dcbc5c3f1ae52819d9fe10e9b529246afe4b Mon Sep 17 00:00:00 2001 From: "cbiesinger%web.de" Date: Fri, 3 Oct 2003 20:56:52 +0000 Subject: [PATCH] 220463 use more error codes in nsExternalAppHandler::SendStatusChange r=bzbarsky sr=darin We now show a useful dialog for NS_ERROR_OUT_OF_MEMORY, and we treat NS_ERROR_FILE_UNRECOGNIZED_PATH like FILE_NOT_FOUND. git-svn-id: svn://10.0.0.236/trunk@147538 18797224-902f-48f8-a5cc-f745e15eee43 --- .../locale/en-US/nsWebBrowserPersist.properties | 1 + mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/mozilla/embedding/components/webbrowserpersist/locale/en-US/nsWebBrowserPersist.properties b/mozilla/embedding/components/webbrowserpersist/locale/en-US/nsWebBrowserPersist.properties index 6bd72a9aa5e..96c1b45e9d6 100644 --- a/mozilla/embedding/components/webbrowserpersist/locale/en-US/nsWebBrowserPersist.properties +++ b/mozilla/embedding/components/webbrowserpersist/locale/en-US/nsWebBrowserPersist.properties @@ -42,4 +42,5 @@ diskFull=There is not enough room on the disk to save %S.\n\nRemove unnecessary 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. +noMemory=There is not sufficient memory to complete the action you requested.\n\nQuit some applications and try again. title=Downloading %S diff --git a/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp b/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp index 4e2c84b51cc..4ab1598fb54 100644 --- a/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp +++ b/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp @@ -1422,6 +1422,11 @@ void nsExternalAppHandler::SendStatusChange(ErrorType type, nsresult rv, nsIRequ nsAutoString msgId; switch(rv) { + case NS_ERROR_OUT_OF_MEMORY: + // No memory + msgId = NS_LITERAL_STRING("noMemory"); + break; + case NS_ERROR_FILE_DISK_FULL: case NS_ERROR_FILE_NO_DEVICE_SPACE: // Out of space on target volume. @@ -1439,6 +1444,7 @@ void nsExternalAppHandler::SendStatusChange(ErrorType type, nsresult rv, nsIRequ break; case NS_ERROR_FILE_NOT_FOUND: + case NS_ERROR_FILE_UNRECOGNIZED_PATH: // Helper app not found, let's verify this happened on launch if (type == kLaunchError) { msgId = NS_LITERAL_STRING("helperAppNotFound");