title: How can I get more details about errors generated during protobuf parsing? (C++)
body: <p>I am new to protobuf (C++) and my code fails during parse of my messages. How can I get more details about the errors that occurred?</p>
  
  <p><strong>Example</strong></p>
  
  <p>The following snippet illustrates the problem:</p>
  
  <pre><code>const bool ok=my_message.ParseFromCodedStream(&amp;stream);
  if(ok){
      std::cout&lt;&lt; "message parsed. evidence:\n"&lt;&lt; my_message.DebugString();
  }
  else{
      std::cerr&lt;&lt; "error parsing protobuf\n";
      //HOW CAN I GET A REASON FOR THE FAILURE HERE?
  }
  </code></pre>