C# Class NUnit.Framework.Internal.ExceptionHelper

ExceptionHelper provides static methods for working with exceptions
Afficher le fichier Open project: nunit/nunit

Méthodes publiques

Méthode Description
BuildFriendlyMessage ( Exception exception ) : string

Builds up a message, using the Message field of the specified exception as well as any InnerExceptions. Excludes exception names, creating more readable message

BuildMessage ( Exception exception ) : string

Builds up a message, using the Message field of the specified exception as well as any InnerExceptions.

BuildStackTrace ( Exception exception ) : string

Builds up a message, using the Message field of the specified exception as well as any InnerExceptions.

GetStackTrace ( Exception exception ) : string

Gets the stack trace of the exception.

Rethrow ( Exception exception ) : void

Rethrows an exception, preserving its stack trace

Private Methods

Méthode Description
BuildMessage ( Exception exception, bool isFriendlyMessage ) : string
ExceptionHelper ( ) : System
FlattenExceptionHierarchy ( Exception exception ) : List
WriteException ( StringBuilder sb, Exception inner, bool isFriendlyMessage ) : void

Method Details

BuildFriendlyMessage() public static méthode

Builds up a message, using the Message field of the specified exception as well as any InnerExceptions. Excludes exception names, creating more readable message
public static BuildFriendlyMessage ( Exception exception ) : string
exception System.Exception The exception.
Résultat string

BuildMessage() public static méthode

Builds up a message, using the Message field of the specified exception as well as any InnerExceptions.
public static BuildMessage ( Exception exception ) : string
exception System.Exception The exception.
Résultat string

BuildStackTrace() public static méthode

Builds up a message, using the Message field of the specified exception as well as any InnerExceptions.
public static BuildStackTrace ( Exception exception ) : string
exception System.Exception The exception.
Résultat string

GetStackTrace() public static méthode

Gets the stack trace of the exception.
public static GetStackTrace ( Exception exception ) : string
exception System.Exception The exception.
Résultat string

Rethrow() public static méthode

Rethrows an exception, preserving its stack trace
public static Rethrow ( Exception exception ) : void
exception System.Exception The exception to rethrow
Résultat void