For example, if a low-level exception thrown as a result of a unique index constraint is thrown, then this isn't really a problem, so should be rendered appropriately for the user.
The JDO object store throws a stack trace whose causal chain contains both:
Insert of object "dom.todo.ToDoItem@5a538af7" using statement "INSERT INTO TODOITEM (ATTACHMENT,COMPLETE,OWNEDBY,DESCRIPTION,CATEGORY,NOTES,DUEBY,VERSION) VALUES (?,?,?,?,?,?,?,?)" failed : integrity constraint violation: unique constraint or index violation; TODOITEM_U1 table: TODOITEM
and even more low level below it:
integrity constraint violation: unique constraint or index violation; TODOITEM_U1 table: TODOITEM
It ought to be possible to render to the user as "Sorry, a ToDoItem already exists" or something similar.