Maybe some further explaining is in order. I now have something like this:
Code:
<transition on-exception="path.to.class.ValidationFailedException" to="importFiles">
<set name="flashScope.messageCode" value="'fileimport.error.validation_failed'" />
</transition>
so now the message that is set is hardcoded. But I'd like to have it customized in the exception somehow, like:
Code:
<transition on-exception="path.to.class.ValidationFailedException" to="importFiles">
<set name="flashScope.messageCode" value="ValidationFailedException.getMessageText()" />
</transition>