The FAILMESSAGE only ever returns the last failure message. But this may not be the error the user is interested in.
This is particularly true for ASSERTions...FAIL, where the last error message is 'Aborted'. The actual message generated by the ASSERTION is lost.
- an option to retrieve all messages of a particular severity. (default 'error')
- an option to filter by severity: one of 'info', 'warning' or 'error'. Where perhaps a message type of a particular severity, also returns all messages of higher severity.
I actually use my own FUNCTION that gets the info via a soapcall, and posted on the forum (tops-and-trick), as it's useful. But the functionality could be subsumed into the language.