I was thinking that is it possible to do exception handling using Attribute, rather than write "try...catch" in every single method.
for example, now, each of my method look like this:
public void DoSomething()
{
try
{
// do something
}
catch (Exception ex)
{
// exception handling rules, always the same.
throw;
}
}
I want:
[HandleException]
public void DoSomething()
{
// do something
}
Is it possible?