Uncatchable exception with getfiles method running v1 cf on ce.net 5.0

R

RobGSCL

I have an application that runs sucessfully on ce.net 4.x. When I run
it on ce.net 5.0, it throws an exception on directory.getfiles. For
some reason, the exception won't get trapped. Has anyone else seen
this?
 
R

RobGSCL

lol. Sorry:

Private Sub cleanTempDir(Optional ByVal Tpath As String = "\Temp",
Optional ByVal Tfilter As String = "*.TMP")
Try
If Right(Tpath, 1) <> "\" Then Tpath = Tpath & "\"
Dim Tfiles() As String = Directory.GetFiles(Tpath, Tfilter)
'<-here's where it bombs
Dim Tfile As String
For Each Tfile In Tfiles
Try
File.Delete(Tfile)
Catch ex As Exception
End Try
Next Tfile
Catch ioex As IOException
Catch ex As Exception

End Try

End Sub
 
R

RobGSCL

ttt
lol. Sorry:

Private Sub cleanTempDir(Optional ByVal Tpath As String = "\Temp",
Optional ByVal Tfilter As String = "*.TMP")
Try
If Right(Tpath, 1) <> "\" Then Tpath = Tpath & "\"
Dim Tfiles() As String = Directory.GetFiles(Tpath, Tfilter)
'<-here's where it bombs
Dim Tfile As String
For Each Tfile In Tfiles
Try
File.Delete(Tfile)
Catch ex As Exception
End Try
Next Tfile
Catch ioex As IOException
Catch ex As Exception

End Try

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top