C# Класс Endjin.Assembly.ChangeDetection.Infrastructure.ExceptionHelper

Use this class in your catch(Exception ex) handler to determine if you can safely swallow and trace this exception or if it is so severe that it should be propagated to the highest layer. It is mandatory to use this function inside your finalizer to guard the finalizer thread against exceptions.
Показать файл Открыть проект

Открытые методы

Метод Описание
IsFatal ( Exception ex ) : bool

It is mandatory to use this function inside your finalizer to guard the finalizer thread against exceptions. Determines whether the specified exception is fatal and should be propagated to the next layer regardless of your current exception policy. An exception is considered fatal is it is one of the following types: NullReferenceException, StackOverflowException, OutOfMemoryException, ThreadAbortException, ExecutionEngineException, IndexOutOfRangeException or AccessViolationException

IsSecurityOrFatal ( Exception ex ) : bool

Determines whether the exception is a security or fatal exception. Use this functions in security relevant code inside any catch(Exception ex) handler to prevent swallowing relevant exceptions.

WhenException ( System.Action executeWhenExceptionHasOccured ) : void

Normally used in a finally block to execute code when an exception has occured.

Описание методов

IsFatal() публичный статический Метод

It is mandatory to use this function inside your finalizer to guard the finalizer thread against exceptions. Determines whether the specified exception is fatal and should be propagated to the next layer regardless of your current exception policy. An exception is considered fatal is it is one of the following types: NullReferenceException, StackOverflowException, OutOfMemoryException, ThreadAbortException, ExecutionEngineException, IndexOutOfRangeException or AccessViolationException
public static IsFatal ( Exception ex ) : bool
ex System.Exception The exception to check.
Результат bool

IsSecurityOrFatal() публичный статический Метод

Determines whether the exception is a security or fatal exception. Use this functions in security relevant code inside any catch(Exception ex) handler to prevent swallowing relevant exceptions.
public static IsSecurityOrFatal ( Exception ex ) : bool
ex System.Exception The exception to test.
Результат bool

WhenException() публичный статический Метод

Normally used in a finally block to execute code when an exception has occured.
public static WhenException ( System.Action executeWhenExceptionHasOccured ) : void
executeWhenExceptionHasOccured System.Action The method to execute when exception has occured.
Результат void