What’s better and why:
This
public void Main()
{
SomeMethod();
}
public void SomeMethod()
{
try
{
// code
}
catch(Exception)
{
}
}
or this:
public void Main()
{
try
{
SomeMethod();
}
catch(Exception)
{
}
}
The answer is: “catch the exception at the lowest level that knows how to handle it.”