title: catch error when user is trying to insert duplicated value in database - greenDAO
body: <p>im using greenDAO to generate my DAO classes, everything works fine till i try to insert duplicated values for primary key.</p>
  
  <p>It fails when i try to insert duplicated primery key (as expected), but i would like to send the exception to the user and not o explode with the app.</p>
  
  <p>For now the only solution i have, and i think its not the best, is to do a query before insert, and check if the result count is greater than 0 or not.</p>
  
  <p>There is a better way to do it?</p>
  
  <p>the method .insert returns a Long value, but when it fails to insert it doesn't return anything, just explodes with the app.</p>