Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Catch unhandled exception in WCF

In WCF, is there an event or method that catches unhandled exceptions, or do I need to put a try/catch in any method?

like image 834
zvi Avatar asked Apr 29 '10 00:04

zvi


Video Answer


1 Answers

Yes, create a class that implements the IErrorHandler interface:

Allows an implementer to control the fault message returned to the caller and optionally perform custom error processing such as logging.

like image 57
Andrew Hare Avatar answered Oct 11 '22 09:10

Andrew Hare