IOException on folderitem.open

How can I make an IOException when opening a folderitem? theFolderitem contains a path to Filemaker Pro.

dim theBundleID as String = theFolderitem.getBundleID
globals.theErrorLog.LogItem CurrentMethodName + " " + theBundleID
if theBundleID = "" then
  theResult = false
  Globals.theErrorlog.DialogErrorProceed(kErrorFilemakerMissing)
  return theResult
end if

dim theProc as processMBS = Utility.getProcess(theBundleID, True)
if theProc = Nil then theFolderitem.Open

Stacktrace:

Sub FolderItem._RaiseIOErrorAsNeeded()
Sub FolderItem.Open(boolean)
Function Utility.startCreatorApplication(FolderItem) as boolean
Function ExportCheckerFilemaker.CheckArchiveFolderItem() as boolean
Function ExportCheckerFilemaker.Check() as boolean
Function ExportChecker.Check() as boolean
Function MaxModel.PrepareForFilemaker(FolderItem) as boolean

Xojo 2020r2.1

IOExceptions carry the OS specific error information in the Message and ErrorNumber properties. What is the message / code?

2 Likes

Ups. Why did I never add errornumber and message to my logging?

I’ve made a try/catch for now with an error message.

Still super weird. The user is still no Mojave and not BS “I’ve lost access to my own Application Support folder”.

1 Like

I had that recently, that’s why I asked. If the error number is 104 you’re stuck with the same problem as me: OSStatus — Apple API Errors

I have absolutely no idea and multiple experts I asked eventually came to “reinstall macOS.” I told the user there’s nothing I can do.

1 Like

Sheeeet…

It sucks having to tell customers “Have you tried turning it off and on again”, but telling your customer, have you tried re-installing the macOS…

Oh look, one of the experts I asked!

Hey, what… I am not one of those experty type thingamyjigs… You must have me confused with someone smart.

Although I forget how many refunds I’ve had to issue for our HDR apps where certain OS versions on certain Macs will simply not render the HDR image.

image macOS really has become like Windows Vista.

I totally forgot my favourite troubleshooting technique: restarting the computer. But I’ll make the user a new version with more logging information.

How did I make the emoji so large???

1 Like

FWIW, you can get this exception if the FolderItem:

  • Doesn’t exist
  • Is not readable
  • parent folder is not readable

I omitted most of the code which I use to get to the above code including the nil and exist checks. The folderitem in question is the location of Filemaker Pro on the computer.

Good to know, thank you for sharing.