Bug 162144 - Handle exceptions thrown by the file picker properly.

r=rginda@hacksrus.com
This commit is contained in:
silver%warwickcompsoc.co.uk 2004-04-26 10:05:21 +00:00
Родитель 1bf50f6e9c
Коммит a9c9de36a3
1 изменённых файлов: 11 добавлений и 2 удалений

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

@ -175,7 +175,7 @@ function pickSaveAs (title, typeList, defaultFile, defaultDir)
picker.init (window, title ? title : futils.MSG_SAVE_AS,
Components.interfaces.nsIFilePicker.modeSave);
var reason;
var reason = PICK_CANCEL;
try
{
@ -214,7 +214,16 @@ function pickOpen (title, typeList, defaultFile, defaultDir)
picker.init (window, title ? title : futils.MSG_OPEN,
Components.interfaces.nsIFilePicker.modeOpen);
var rv = picker.show();
var rv = PICK_CANCEL;
try
{
rv = picker.show();
}
catch (ex)
{
dd ("caught exception from file picker: " + ex);
}
if (rv != PICK_CANCEL)
futils.lastOpenDir = picker.file.parent;