ExceptionHandler.HandleException(Exception) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
When overridden in a derived class, returns true
if the exception has been handled, or false
if the exception should be rethrown and the application terminated.
public:
abstract bool HandleException(Exception ^ exception);
public abstract bool HandleException(Exception exception);
abstract member HandleException : Exception -> bool
Public MustOverride Function HandleException (exception As Exception) As Boolean
- exception
- Exception
The exception the occurred within the Windows Communication Foundation (WCF) runtime and which may terminate the application.
true
if the exception has been handled; otherwise, false
.
The following code example shows an implementation of the ExceptionHandler abstract class that overrides the HandleException method.
The following code example shows how to enable the custom MyExceptionHandler
for unhandled exceptions that occur within the WCF runtime.
The HandleException property returns true
if the exception has been handled. If it returns false
or throws a different exception, the original exception is rethrown.
Производ | Верзије |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET повратне информације
.NET је пројекат отвореног кода. Изаберите везу да бисте обезбедили повратне информације: