用c++做了一个com组件,其中要抛出异常:
void throw_some_exception
{
throw "some exception";
}
但是c#中捕捉到的异常信息e.Message只是“外部组件错误”,而不能显示"some exception"。
谁知道怎样才能得到具体的异常信息?
void throw_some_exception
{
throw "some exception";
}
但是c#中捕捉到的异常信息e.Message只是“外部组件错误”,而不能显示"some exception"。
谁知道怎样才能得到具体的异常信息?
The parameter ed as retval is left off of the argument list of the method.
Any non-success return value will cause a System.COMException exception to be thrown.
事实是,即使不用com,直接导出dll供c#调用,
自己抛出的异常也不能捕捉