नोट
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप साइन इन करने या निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
'exception' : unable to throw or catch a managed or WinRT object by value or reference
Remarks
The type of a managed or WinRT exception was not correct.
Examples
The following example generates C2725 and shows how to fix it.
// C2725.cpp
// compile with: /clr
ref class R {
public:
int i;
};
int main() {
R % r1 = *gcnew R;
throw r1; // C2725
R ^ r2 = gcnew R;
throw r2; // OK
}
The following example generates C2725 and shows how to fix it.
// C2725b.cpp
// compile with: /clr
using namespace System;
int main() {
try {}
catch( System::Exception%) {} // C2725
// try the following line instead
// catch( System::Exception ^e) {}
}