C# Class Elmah.ErrorDisplay

Provides miscellaneous formatting methods for
ファイルを表示 Open project: elmah/Elmah Class Usage Examples

Public Methods

Method Description
HumaneExceptionErrorType ( Error error ) : string

Formats the error type of an Error object in a short and human-readable form.

HumaneExceptionErrorType ( string type ) : string

Formats the type of an error, typically supplied as the Error.Type value, in a short and human- readable form.

Typically, exception type names can be long to display and complex to consume. The essential part can usually be found in the start of an exception type name minus its namespace. For example, a human reading the string, "System.Runtime.InteropServices.COMException", will usually considers "COM" as the most useful component of the entire type name. This method does exactly that. It assumes that the the input type is a .NET Framework exception type name where the namespace and class will be separated by the last period (.) and where the type name ends in "Exception". If these conditions are method then a string like, "System.Web.HttpException" will be transformed into simply "Html".

Method Details

HumaneExceptionErrorType() public static method

Formats the error type of an Error object in a short and human-readable form.
public static HumaneExceptionErrorType ( Error error ) : string
error Error
return string

HumaneExceptionErrorType() public static method

Formats the type of an error, typically supplied as the Error.Type value, in a short and human- readable form.
Typically, exception type names can be long to display and complex to consume. The essential part can usually be found in the start of an exception type name minus its namespace. For example, a human reading the string, "System.Runtime.InteropServices.COMException", will usually considers "COM" as the most useful component of the entire type name. This method does exactly that. It assumes that the the input type is a .NET Framework exception type name where the namespace and class will be separated by the last period (.) and where the type name ends in "Exception". If these conditions are method then a string like, "System.Web.HttpException" will be transformed into simply "Html".
public static HumaneExceptionErrorType ( string type ) : string
type string
return string