Quantcast
Channel: Xojo Programming Forum - Latest topics
Viewing all articles
Browse latest Browse all 3798

CreateFolder Try with no Catch

$
0
0

Hi, I consider this a bug but I prefer to ask before fill a bug report.

Try
  f_Elt.CreateFolder
Catch
  MessageBox "Error while creating folder" ' This is not displayed even if error occurs
End Try

If f_Elt.parent is a lock folder, I have an error and then the MessageBox. It’s ok for me.
But if I do

Try
  f_Elt.CreateFolder
' Catch
  ' MessageBox "Error while creating folder" ' This is not displayed even if error occurs
End Try

The application crash if built or in Debugmode. I think that if with put a Try - End Try, the error should be handled even if we don’t need the Catch.
If the Catch is necessary, then the IDE should alert “Catch statement is missing.”
Download the sample project CreateFolder_NotHandleError if you want to try.
I’m under macOS BigSur 11.7.10 with Xojo 2024r1.

11 posts - 6 participants

Read full topic


Viewing all articles
Browse latest Browse all 3798

Trending Articles