Sitecore 5.1.1 API

MainUtil.GetExceptionMessage Method 

Gets the message from an exception.

[Visual Basic]
Public Shared Function GetExceptionMessage( _
   ByVal ex As Exception _
) As String
[C#]
public static string GetExceptionMessage(
   Exception ex
);

Parameters

ex
An exception.

Return Value

The message part of the exception.

Remarks

The message includes any inner exceptions.

Example

  string message = MainUtil.GetExceptionMessage(exption);

See Also

MainUtil Class | Sitecore Namespace