I have the following situation:
class A
{
abstract void foo()
{
}
}
many MANY classes inherit from A
, and override foo()
.
I want to catch all exceptions thrown from those overridden foo
s.
I thought about decorating A
's foo
, and to try..catch all of foo
's contents, and was hoping the overriding classes' foo
s would also be decorated with the try..catch from the base A
's foo
.
Is this doable? If so, how? Is there a better way?