ExceptionFormatter.WriteException Method
Formats the exception and all nested inner exceptions.
Namespace: Microsoft.Practices.EnterpriseLibrary.ExceptionHandling
Assembly: Microsoft.Practices.EnterpriseLibrary.ExceptionHandling (in Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.dll) Version: 6.0.0.0 (6.0.1304.0)
Syntax
protected virtual void WriteException(
Exception exceptionToFormat,
Exception outerException
)
'Declaration
Protected Overridable Sub WriteException (
exceptionToFormat As Exception,
outerException As Exception
)
protected:
virtual void WriteException(
Exception^ exceptionToFormat,
Exception^ outerException
)
Parameters
- exceptionToFormat
Type: System.Exception
The exception to format.
- outerException
Type: System.Exception
The outer exception. This value will be null when writing the outer-most exception.
Remarks
This method calls itself recursively until it reaches an exception that does not have an inner exception.
This is a template method which calls the following methods in order
- WriteExceptionType(Type)
- WriteMessage(String)
- WriteSource(String)
- WriteHelpLink(String)
- WriteReflectionInfo(Exception)
- WriteStackTrace(String)
- If the specified exception has an inner exception then it makes a recursive call. WriteException(Exception, Exception)
See Also
Microsoft.Practices.EnterpriseLibrary.ExceptionHandling Namespace