Catching File Not Found Exception VB.net
-
Hello, I have an Application Where in The Code Reads from a File present in Application Directory. Now if the file is not present, then the code displays the message that File Not Found along with the Full File Path. This is what i don't want, I need only to display File Not Found and not the file path. Could anyone please tell me how can i check what kind of Exception has occured in the catch block and display my own messages as per the exception. Hope I have explained my problem properly, Thanks in Advance.
-
Hello, I have an Application Where in The Code Reads from a File present in Application Directory. Now if the file is not present, then the code displays the message that File Not Found along with the Full File Path. This is what i don't want, I need only to display File Not Found and not the file path. Could anyone please tell me how can i check what kind of Exception has occured in the catch block and display my own messages as per the exception. Hope I have explained my problem properly, Thanks in Advance.
In C# catch below exception System.IO.FileNotFoundException
--Akki