The exception caught is generic and defeats the purpose of exception handling. Each type of exception provides an insight into what exactly went wrong and provides scenario-specific ways for graceful recovery. While it is easy to recover from some exceptions, a small subset of them make the recovery very difficult, usually because the conditions are not suitable for the program to continue executing. It is therefore suggested that you switch to a better approach of exception handling and recovery.
try
{
var num = int.Parse(input);
}
catch (Exception)
{
// ...
}
try
{
var num = int.Parse(input);
}
catch (ArgumentException)
{
// ...
}