Messaging on result of Java-action send email

According to a previous question when a Java-action is about to send an email but the domain name can't be found, the user gets the message on the screen (not in a pop-up or something): A server exception occurred: recipient address rejected: domain not found (which is probably a standard system message). In order to make it clear for the user that the email address he/she filled in isn't correct, is it possible to build in a pop-up message that points this out much clearer? (so that must be a message that is triggered after the Java-action is executed, and the email address turns out to be non existent)
1 answers

Another option is to catch exceptions that can occur inside the Java action, and then add a validation feedback message to be shown to the user.