Is there a way to catch all unhandled exceptions thrown by a given class?

后端 未结 6 2073
你的背包
你的背包 2020-12-18 13:21

I know how to catch all unhandled exceptions in a given thread, but wondering if there is a way to catch all unhandled exceptions thrown by a given class in

6条回答
  •  甜味超标
    2020-12-18 14:16

    If it is about WCF exceptions, I would recommend plugging a dedicated behavior into the WCF pipeline. I have written a detailed example here

    It is based on two interfaces IErrorHandler and IServiceBehavior, it is also usable as an attribute and in file-based configurations.

提交回复
热议问题