Fixed error handling for Edit/Add table

A correct error message should now be shown in the message box