How to show an error message from JavaAction on login page

I am customizing the login page with reference to the following: When I failed to authorize,I want to show an error message thrown from CustomLoginAction(Java class) on the login page. But,I can not show an error message thrown from CustomLoginAction on the login page. Instead of,Be shown an error message the following. "Sign in failed." Does anyone know it? Could somebody please teach me how to show an error message thrown from Java on the login page.  
1 answers

Hello Masao,

You can use a different error handling behaviour for your java (to do so right click on your action and select "Set error handling"). For example if you set it up to do your custom behaviour with rollback you can set a different flow to be followed if the java fails and display a custom message based on $latestError.

Might also be work having a look at the Error handling Mendix academy learning path.

Hope this helps