title: Handling pgPL/SQL exceptions From QtSQL
body: <p><strong>Short and simple:</strong></p>
  
  <p>How to catch pgPL/SQL exceptions with QtSQL?</p>
  
  <p>I haven't found any example or info at the docs.</p>
  
  <p><strong>More details:</strong></p>
  
  <p>I'm developing the front end for a system with Qt 5.3. The database perform some validation at some of the inputs and raise custom exceptions when something is invalid. What I want is to be able to handle these exceptions at he front end code, showing appropriate messages to the user.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I have tried to use the <code>QSqlError</code> class. Although it gave me the exception, it gave me too much data which will need to be parsed to be useful. Is there a way to get the exception raised without parsing the messages?</p>