[Gambas-user] Try Catch fail when using mkdir....

Fabien Bodard gambas.fr at ...626...
Fri Jul 1 12:13:51 CEST 2011


This is the good way in your way ... but it's a bad way in my fill

Private Sub CreateNewOutputFolder(sFolderSpec As String)

  If Not Exist(sFolderSpec) Then Mkdir sFolderSpec

 Catch
    'if problem try on the prec folder
    CreateNewOutputFolder(File.Dir(sFolderSpec))
    'Re Try the folder creation if all is good
    Mkdir sFolderSpec

End


Because you can't manage correctly all the errors.




More information about the User mailing list