How to store display Mendix error messages in table
I have made an automatic process (import function) which is depended of the quality a the system providing the input. Therefore I made some checks and the status and "error" messages are stored in a table and displayed. When I have not identified the error Mendix itself will throw an exception which I of course also want to display. Two questions: 1/ In the last "Action Activity" to set the status I also store the variable "$lastErrorMessage", but this does not work. My error ? 2/ In the attributes of the Microflow there is the attribute "Error Microflow" of which I cannot find any documentation. What is the purpose of this attribute and is it useful for store Mendix error messages ?
In general, i catch exceptions as follows:
You can right click the activity which throws the error (this might be a microflow call activity as well, errors bubble up through the MF stack)
set custom error handling to 'custom without rollback'
drag a third arrow out of the activity
right click the arrow
set as error handler
in all activities in this sub flow the $lastErrorMessage is set, and you can manually handle exceptions thrown by Mendix.