I just want to add that i'm pretty much confused by the various ways errors are handled within Joomla!.
Meanwhile i cannot overseah anymore where to use JLog::add(), JError::raiseError(), throw Exception, setError(), enqueueMessage().
The suggested solution with the try/catch block in my JTable:store method in fact fixes the JModel::save problem mentioned. But it does not solve the problem with the last chain link - the JController::save method, where on error an additional message is added to JController::setError + JController::setMessage before returning to the view. This causes double output - one with error message and one without like:
Error
Duplicate entry.
Save failed with the following error: empty because no error message returned from JModel::save
The first two lines come the try/catch block in JTable::store, while the last line comes from JController::save.
To prevent me from duplicating code just to override 6 lines of unwanted behavior i combined your solution with the old behavior. Now the error is catched within the catch block and a customised message is set via setError(). This message properly arrives in JModel::save and from there to JController::save resulting in only one error message displayed.
Error
Save failed with the following error:
Duplicate entry.
I think it is time to clean this up and stay with one solution.