Table of Contents

Class AbpExceptionExtensions

Namespace
System
Assembly
Volo.Abp.Core.dll

Extension methods for Exception class.

public static class AbpExceptionExtensions
Inheritance
AbpExceptionExtensions
Inherited Members

Methods

GetLogLevel(Exception, LogLevel)

Try to get a log level from the given exception if it implements the IHasLogLevel interface. Otherwise, returns the defaultLevel.

public static LogLevel GetLogLevel(this Exception exception, LogLevel defaultLevel = LogLevel.Error)

Parameters

exception Exception
defaultLevel LogLevel

Returns

LogLevel

ReThrow(Exception)

Uses Capture(Exception) method to re-throws exception while preserving stack trace.

public static void ReThrow(this Exception exception)

Parameters

exception Exception

Exception to be re-thrown