GCC 4.5.2 Linker gots Problem while using Exceptions (C++)

后端 未结 2 987
面向向阳花
面向向阳花 2020-12-21 18:30

I try to write a webserver. As far as I am, it works quiet good with Windows. But I want to make it also Unix compatible. And I think there has to be a problem with the here

2条回答
  •  忘掉有多难
    2020-12-21 19:25

    You aren't showing the relevant code and compiler invocation, but know that std::exception has an unimplemented virtual member function what() that you're expected to override, so don't go throwing naked std::exceptions if you want to callwhat().

    Any of the derived, specific exceptions in will implement what() and allow you to store a message when you're constructing the exception object.

提交回复
热议问题