Error messages handling

When saving data form with checking duplicate data (unique index on columns) the generic error message popup is displayed. This is not enough for generic user - would be better if programmer could make own error message.
Suggestion: Catch an error on modeled index and in Documentation make possibility assign proper user message (like a user documentation)