Show / Hide Table of Contents

Class ExceptionExtensions

Extends Exception class.

Inheritance
object
ExceptionExtensions
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: DotNext.Runtime.ExceptionServices
Assembly: DotNext.dll
Syntax
public static class ExceptionExtensions

Methods

View Source

Throw(Exception, bool)

Throws source

Declaration
[DoesNotReturn]
public static void Throw(this Exception source, bool replaceStackTrace = true)
Parameters
Type Name Description
Exception source
bool replaceStackTrace

true to replace stack trace already presented in source with the current stack trace; otherwise, false.

Exceptions
Type Condition
Exception

The exception which is equal to source.

View Source

Throw<TException>()

Throws TException.

Declaration
[DoesNotReturn]
public static void Throw<TException>() where TException : Exception, new()
Type Parameters
Name Description
TException
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾