One of the most valuable benefits of using an error table (app/config/errors.xml) is how easy is to maintain I18n strings bound to each exception.
i.e.
Now we can declare a I18n file for each language, setting an entry with the same name as the id assigned to each error within the error table.
If we have an error with id ERR_WRONG_USERNAME_OR_PASSWORD, this is the entry that we must set in our I18n files.
i.e.
;------------------------------------------------
;Error strings: /////////////////////////////////
;------------------------------------------------
ERR_INVOICE_CANNOT_BE_EMPTY = "Invoice can not be empty"
ERR_INVOICE_WRONG_DATE = "Wrong date assigned to invoice"
ERR_INVOICE_NOT_FOUND = "Invoice not found: {0}"
ERR_CUSTOMER_NOT_FOUND = "Customer not found: {0}"
...
ERR_WRONG_USERNAME_OR_PASSWORD = "Either the email does not correspond to
any registered user or the password is wrong"
ERR_ACCESS_LOGIN_REQUIRED = "You must be logged-in to access to this page"
...
It's important to note that we must configure I18n strings as per session in case the exceptions may happens in whatever page, otherwise as per request.
However, recommend to configure them as per session since eases refactorizations