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

  • Thread starter Thread starter RobGSCL
  • Start date Start date
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?
 
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
 
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
 
Back
Top