If CREATE FOLDER is used to attempt to create a folder on a mounted volume that does not have write access, an error is generated and 4D stops executing code.
For example, say that CREATE FOLDER is on line 5 of a 20-line procedure.
The procedure runs to line 5 and gets an error.
Lines 6 through 20 are not run.
CREATE FOLDER seems to work fine when you have write access to the volume.
Any time that 4D encounters this type of error (from the command - not syntax error), the rest of the procedure will be terminated. This problem can be resolved by using ON ERR CALL:
ON ERR CALL("Method_To_Handle_Error")
CREATE FOLDER (folderPath)
ON ERR CALL("")