DataProviderException 建構函式 (String, Exception)
DataProviderException 初始化類別的新執行個體,並指定一個錯誤訊息和參考造成這個例外狀況原因的內部例外狀況。
命名空間: Microsoft.VisualStudio.Data.Core
組件: Microsoft.VisualStudio.Data.Core (在 Microsoft.VisualStudio.Data.Core.dll 中)
語法
'宣告
Protected Sub New ( _
message As String, _
innerException As Exception _
)
protected DataProviderException(
string message,
Exception innerException
)
protected:
DataProviderException(
String^ message,
Exception^ innerException
)
new :
message:string *
innerException:Exception -> DataProviderException
protected function DataProviderException(
message : String,
innerException : Exception
)
參數
message
類型:String描述錯誤的訊息。
innerException
類型:Exception導致目前例外狀況的例外。 如果 innerException 參數不是 nullnull 參考 (即 Visual Basic 中的 Nothing),則目前的例外狀況會在處理內部例外狀況的 Catch 區塊中引發。
備註
被擲回以做為前一個例外狀況直接原因的例外狀況,會包含對 InnerException 屬性中前一個例外狀況的參考。 InnerException 屬性會傳回與傳入建構函式中相同的值;如果 InnerException 屬性沒有提供內部例外狀況值給建構函式,則傳回 nullnull 參考 (即 Visual Basic 中的 Nothing)。
這個建構函式在 DDEX Runtime 通常只會呼叫。
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。