Class TextExceptionFormatter
Implements a plain text formater for exception.
Namespace: Sartorius.SAF.ExceptionHandling
Assembly: Sartorius.SAF.dll
Syntax
public class TextExceptionFormatter : ExceptionFormatter
Properties
View SourceMessage
Gets a current formatted text.
Declaration
public string Message { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
View SourceFormat(Exception)
Formats the System.Exception into the underlying stream.
Declaration
public override string Format(Exception ex)
Parameters
Type | Name | Description |
---|---|---|
System.Exception | ex |
Returns
Type | Description |
---|---|
System.String |
Overrides
View SourceIndent()
Indents the System.IO.TextWriter.
Declaration
protected virtual void Indent()
WriteAdditionalInfo(NameValueCollection)
Writes the additional properties to the System.IO.TextWriter.
Declaration
protected override void WriteAdditionalInfo(NameValueCollection additionalInformation)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Specialized.NameValueCollection | additionalInformation | Additional information to be included with the exception report |
Overrides
View SourceWriteDateTime(DateTime)
Writes the current date and time to the System.IO.TextWriter.
Declaration
protected override void WriteDateTime(DateTime utcNow)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | utcNow | The current time. |
Overrides
View SourceWriteDescription()
Writes a generic description to the underlying text stream.
Declaration
protected override void WriteDescription()
Overrides
View SourceWriteException(Exception, Exception)
Writes and formats the exception and all nested inner exceptions to the System.IO.TextWriter.
Declaration
protected override void WriteException(Exception exceptionToFormat, Exception outerException)
Parameters
Type | Name | Description |
---|---|---|
System.Exception | exceptionToFormat | The exception to format. |
System.Exception | outerException | The outer exception. This value will be null when writing the outer-most exception. |
Overrides
View SourceWriteExceptionType(Type)
Writes the value of the System.Type.AssemblyQualifiedName property for the specified exception type to the System.IO.TextWriter.
Declaration
protected override void WriteExceptionType(Type exceptionType)
Parameters
Type | Name | Description |
---|---|---|
System.Type | exceptionType | The System.Type of the exception. |
Overrides
View SourceWriteFieldInfo(FieldInfo, Object)
Writes the name and value of the specified field to the System.IO.TextWriter.
Declaration
protected override void WriteFieldInfo(FieldInfo fieldInfo, object value)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.FieldInfo | fieldInfo | The reflected System.Reflection.FieldInfo object. |
System.Object | value | The value of the System.Reflection.FieldInfo object. |
Overrides
View SourceWriteHelpLink(String)
Writes the value of the specified help link taken from the value of the System.Exception.HelpLink property to the System.IO.TextWriter.
Declaration
protected override void WriteHelpLink(string helpLink)
Parameters
Type | Name | Description |
---|---|---|
System.String | helpLink | The exception's help link. |
Overrides
View SourceWriteMessage(String)
Writes the value of the System.Exception.Message property to the underyling System.IO.TextWriter.
Declaration
protected override void WriteMessage(string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The message to write. |
Overrides
View SourceWritePropertyInfo(PropertyInfo, Object)
Writes the name and value of the specified property to the System.IO.TextWriter.
Declaration
protected override void WritePropertyInfo(PropertyInfo propertyInfo, object value)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.PropertyInfo | propertyInfo | The reflected System.Reflection.PropertyInfo object. |
System.Object | value | The value of the System.Reflection.PropertyInfo object. |
Overrides
View SourceWriteSource(String)
Writes the value of the specified source taken from the value of the System.Exception.Source property to the System.IO.TextWriter.
Declaration
protected override void WriteSource(string source)
Parameters
Type | Name | Description |
---|---|---|
System.String | source | The source of the exception. |
Overrides
View SourceWriteStackTrace(String)
Writes the value of the System.Exception.StackTrace property to the System.IO.TextWriter.
Declaration
protected override void WriteStackTrace(string stackTrace)
Parameters
Type | Name | Description |
---|---|---|
System.String | stackTrace | The stack trace of the exception. |
Overrides
Remarks
If there is no stack trace available, an appropriate message will be displayed.