How can my app make an IOException for the ApplicationSupport folder?
The following code has been working for many moons:
[code]’'locate the application support folder
LogItemToConsole(CurrentMethodName)
dim theFolderitem as FolderItem = SpecialFolder.ApplicationData
dim theAppname as String
#if TargetMacOS then
theAppname = app.getMyAppName
#Else
theAppname = “test”
#Endif
if theAppname = “” then Return nil
if theFolderitem <> nil and theFolderitem.Exists then theFolderitem = theFolderitem.Child(theAppname)
if theFolderitem = nil then Return nil
'create new folder for application
if not theFolderitem.Exists then
try
theFolderitem.CreateFolder
catch err as IOException
MessageDialog.Show("There was a problem with creating the folder for the error logs! Error: " + str(err.ErrorNumber))
end try
end if
if globals.theErrorLog <> nil then
if theFolderitem <> nil then
'everyting okay
else
MessageDialog.Show “There was a problem with getting the location of the error logs.”
end if
end if
LogItemToConsole(CurrentMethodName + " done")
Return theFolderitem
[/code]
First there is an unhandled NOE. The app doesn’t quit but continues. Then there is an error message on the CreateFolder and the error number is a 1. The error descriptions at osstatus.com aren’t very helpful.
Why does the app not quit? What is happening here?
macOS 10.15.4 for the user, Xojo 2019r3.