Weird issue with catching trivial boost exception

落花浮王杯 提交于 2019-12-05 18:35:35

The weird type you see is a boost::exception_detail::clone_impl< boost::exception_detail::error_info_injector< boost::bad_lexical_cast>>. It's a wrapper around (and derived from) bad_lexical_cast provided by Boost.Exception, which provides support for boost::exception_ptr and the error info facilities. It should be caught just fine by the first catch.

When it isn't, that's usually an effect of conflicting RTTI information in different dynamic libraries. It's the only thing I can think of to explain the behavior of your test case.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!