how to print an error message?
I'm working on a plugin for file import. When any problem occurs, it seems I have no mean to tell the user about it (apart from the log!)… or am I wrong? Is there a way to have a message printed to the user, for example when a ClientException is thrown?
You can throw a
RecoverableClientException from your own code. The first
message param is the exception message, the second one,
localizedMessage, is the label that will be used to display an i18n error feedback message.
This exception will be caught by the Seam layer to display an error feedback to the user.
The error message is indeed printed. But for the localized message, I put the key for a message I have in my l10n/ folder … but it is not printed, even though my interface is not in english!