SPRibbonCommandHandler.SetGenericErrorMessage Method (Exception)
Inserts markup into the ECMAScript (JScript, JavaScript) of the page or in the callback function that called this handler that provides a generic error message based on the information provided in the e parameter.
Namespace: Microsoft.SharePoint.WebControls
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
Public Sub SetGenericErrorMessage ( _
e As Exception _
)
'Usage
Dim instance As SPRibbonCommandHandler
Dim e As Exception
instance.SetGenericErrorMessage(e)
public void SetGenericErrorMessage(
Exception e
)
Parameters
e
Type: System.ExceptionThe exception that occurred. This will display the exception message for the user.
Remarks
This method is useful for bubbling up internal errors. For example, if the check-in operation fails with a random exception, you may not know how what the issue is and how to handle it. This method lets you provide an exception that provides specific information about the error.
See Also
Reference
SPRibbonCommandHandler Members