IOException Try

I’m geting an IOException, the folder which it is saving has incorrect Permissions, have that fixed. But I would to know why the Try/Catch is not working.

[code] Try
If uFile.File <> Nil Then
// The file is in the temp folder on disk, so we can load it from there
// to save memory.
outputFile = New FolderItem(ufile.Name)
output = BinaryStream.Create(outputFile, True)
// The file is in memory.
uploadedPicture = Picture.FromData(uFile.Data)
End If
// Now save the file to disk in our upload folder
saveFolder = uploadFolder.Child(uFile.Name)
uFile.Save(saveFolder) <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< getting IOException on this line

  UploadedFileList.RowTag(UploadedFileList.LastIndex) = saveFolder.NativePath 
Catch err As UnsupportedFormatException
  // not a picture, so skip it
Catch err As IOException
  MsgBox("Upload failed: Insufficient permissions to save files to " + uploadFolder.NativePath)
  Exit For
End Try[/code]

Why do you think it is not working?

Remember, Xojo will drop into the debugger at the line you’ve indicated if Break on Exceptions is checked in the Project menu. Clicking Step or Resume will jump to the appropriate Catch block.

Thanks Paul, I forgot that.