- try
- {
- //...
- }
- catch(::Exception &ex)
- {
- ::String s;
- ex.get_message(s);
- System::Diagnostics::Debug::WriteLine("Exception:\\n" + CString::ToSysString(s));
- throw gcnew System::Exception(CString::ToSysString(s));
- }
- //该片段来自于http://www.codesnippet.cn/detail/300820135512.html
来源: http://www.codesnippet.cn/detail/300820135512.html