ExceptionExtensions Class
Provides extension methods for Exception.
public static class ExceptionExtensionsMethods
| Name | Description |
|---|---|
| ToString(Exception, bool) | Converts the exception to a string representation, optionally including all inner exceptions. |
ToString(Exception, bool)
ExceptionExtensions.csConverts the exception to a string representation, optionally including all inner exceptions.
Parameters
exceptionException- The exception to convert.
includeInnerExceptionbooltrueto returnException.ToString, which includes the inner exceptions;falseto return only the type, message and stack trace ofexception.