Menu

#8 RunParameters.cpp:270: bad type ?

v1.0 (example)
closed
nobody
None
5
2017-08-29
2017-08-29
dcb
No

RunParameters.cpp:270:26: warning: catching polymorphic type 'const class std::runtime_error' by value [-Wcatch-value=]

Source code is

       catch (const runtime_error)

Discussion

  • oparviai

    oparviai - 2017-08-29

    Ha! Good catch. Added there & to handle the exception by reference (unless the compiler optimizes unused constant away anyway)

     
  • oparviai

    oparviai - 2017-08-29
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB