Hi Pals,
Application main(), handles the default Exception.
However at Method(function) level i want to catch certain exceptions.
certain method X(), using all System.IO.Path,System.IO.Directory etc objects.
Is it wise to catch all exception thrown by these classes/methods.
Then my method looks like.
void X()
{
try {
....
}
catch(IOException ex)
catch(UnauthorizedAccessException ex)
catch(ArgumentException ex)
catch(ArgumentNullException ex)
catch(PathTooLongException ex)
catch(DirectoryNotFoundException ex)
catch(NotSupportedException ex)
}
Im looking at the way how can i organize the exception handling in method X().
using excessive Catch block do not want to exploit my code.