SqlDataSourceStatusEventArgs.Exception 属性

定义

为数据库在数据操作期间引发的任何异常获取包装。Gets a wrapper for any exceptions thrown by the database during a data operation.

public:
 property Exception ^ Exception { Exception ^ get(); };
public Exception Exception { get; }
member this.Exception : Exception
Public ReadOnly Property Exception As Exception

属性值

Exception

一个 Exception,它将数据库引发的任何异常都包装在其 InnerException 属性中。An Exception that wraps any exceptions thrown by the database in its InnerException property.

注解

Exception属性不表示数据库操作引发的实际异常。The Exception property does not represent the actual exception thrown by the database operation. 您可以使用属性访问引发的异常 InnerExceptionYou can access the thrown exception using the InnerException property.

适用于

另请参阅