Link to home
Start Free TrialLog in
Avatar of Gabriel_Espinoza
Gabriel_EspinozaFlag for Chile

asked on

Implement WCF Error Handling capturing operation parameters

Hello,

I would like to implement a log class which captures all errors in my WCF Service.
I have created the procedures to log in Windows Event Log, but I don't know how to implement the ErrorHandling class to capture even the parameters of the Operation it was executing when the error occurred.

I have created a Global Error Handler In WCF using IErrorHandler but it seems it only gets the exception.

Is there a way to obtain parameters of the method/function/operation it was executing when the error occurred?

Pls help me even if I have to create a custom Excepcion class or whatever.

in advance, many, many thanks!
SOLUTION
Avatar of Navneet Hegde
Navneet Hegde
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Gabriel_Espinoza

ASKER

thanks for your reply navneethegde.

If I get you well, your solution is to create a custom Exception and throw all info I want inside that exception. It seems to be a good solution but too expensive to implement.

Is there a way of getting "LastMethodUsed" or something like that from the ErrorHandler?
I don't know, maybe using Reflexion or something like that :P

Anyway, this is weird because before catching the exception I'm provoking, I get a "TimeOutException" this due to not receiving the close message, weird, cause I'm sending it...
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you for your reply ambience,

I think I will have to mannualy capture the value of the parameters.