K
Koen
Hi,
I have been reading a bit basic stuff about method attributes in C#,
and I wanted to build the following functionality with it:
if a method has the custom attribute <LogException> the method has to
be wrapped as follows:
try
{
// call method
}
catch(System.Exception ex)
{
SaveToDb(ex);
throw ex;
}
Can somebody help me on the way how to implement this kind of
functionality? I'm quite sure this is possible, since i assume the
microsoft exception framework uses the same technique.
Tnx for any help.
Regards,
Koen Appeltans
I have been reading a bit basic stuff about method attributes in C#,
and I wanted to build the following functionality with it:
if a method has the custom attribute <LogException> the method has to
be wrapped as follows:
try
{
// call method
}
catch(System.Exception ex)
{
SaveToDb(ex);
throw ex;
}
Can somebody help me on the way how to implement this kind of
functionality? I'm quite sure this is possible, since i assume the
microsoft exception framework uses the same technique.
Tnx for any help.
Regards,
Koen Appeltans