title: How can I modify the what string of a C++ runtime_error?
body: <p>I have a class which inherits from <code>std::runtime_error</code> like so:</p>
  
  <pre><code>#include &lt;string&gt;
  #include &lt;stdexcept&gt;
  
  class SomeEx : public std::runtime_error
  {
  public:
      SomeEx(const std::string&amp; msg) : runtime_error(msg) { }
  };
  </code></pre>
  
  <p>Said <code>msg</code> will always be something like "invalid type ID 43". Is there any way to build that "what string" with another constructor (or another method) so that I provide only the integer type ID? Something like:</p>
  
  <pre><code>SomeEx(unsigned int id) {
      // set what string to ("invalid type ID " + id)
  }
  </code></pre>