P
Peter R. Fletcher
Should it be possible to do this?
In the following code fragment, fsTemp is a properly initialised
instance of a Class that I have written to do file and directory
searches. The Class's GetFolders method actually does the searching
and returns a collection of names of files corresponding to certain
criteria specified by setting other Properties of the Class instance.
Try
fsTemp.GetFolders(colTemp)
Catch exc As Exception
MessageBox.Show(exc.Message & exc.InnerException.Message)
End Try
If a nonexistent Drive or directory is specified, an exception is
thrown when the search runs, and I was expecting it to be caught by
the Try/Catch block round the method invocation. Instead, it is
treated as an unhandled exception wiithin the Class code.
What am I missing?
In the following code fragment, fsTemp is a properly initialised
instance of a Class that I have written to do file and directory
searches. The Class's GetFolders method actually does the searching
and returns a collection of names of files corresponding to certain
criteria specified by setting other Properties of the Class instance.
Try
fsTemp.GetFolders(colTemp)
Catch exc As Exception
MessageBox.Show(exc.Message & exc.InnerException.Message)
End Try
If a nonexistent Drive or directory is specified, an exception is
thrown when the search runs, and I was expecting it to be caught by
the Try/Catch block round the method invocation. Instead, it is
treated as an unhandled exception wiithin the Class code.
What am I missing?