在使用pinvoke并在linux上运行的dotnet核心应用程序中,当c++抛出(例如-- std::runtime_error )时,我们得到:
terminatecalled recursivelyterminatecalledafterthrowing an instance of 'terminatecalledafterthrowing an <
如果我只是简单地使用throw some_string;,那么我就会得到terminatecalledafterthrowing an instance of 'std::string'。如何才能打印出实际显示的字符串值,例如terminatecalledafterthrowing 'This is wrong'或类似的内容?
谢谢。