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 ?
1 answers

In general, i catch exceptions as follows:

  1. 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)
  2. set custom error handling to 'custom without rollback'
  3. drag a third arrow out of the activity
  4. right click the arrow
  5. set as error handler
  6. in all activities in this sub flow the $lastErrorMessage is set, and you can manually handle exceptions thrown by Mendix.