处理一般异常。
命名空间: Microsoft.SharePoint.WebPartPages
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
Protected Overridable Function HandleGeneralException ( _
e As Exception, _
<OutAttribute> ByRef msg As String _
) As Boolean
用法
Dim e As Exception
Dim msg As String
Dim returnValue As Boolean
returnValue = Me.HandleGeneralException(e, _
msg)
protected virtual bool HandleGeneralException(
Exception e,
out string msg
)
参数
e
类型:System.Exception要处理的异常。
msg
类型:System.String此方法返回时true,包含一个字符串,表示异常 ; 的消息此方法返回false时, 包含空字符串。此参数传递未初始化。
返回值
类型:System.Boolean
true如果已处理的异常 ;否则为false。
备注
此虚拟方法以递归方式检查e和其内部异常,直到查找Exception其类型预期警告,然后设置msg根据Exception的类型。