Add new ERROR and ERROR_DEFERRED keywords to message()
This is split out from the discussions at #19351 (comment 948475) so that it can be worked on as its own smaller task. The following changes should be made to the
- Add a new policy that enables recognition of the new keywords and behavior in the dot points below.
- Add a new ERROR keyword which means the same as FATAL_ERROR.
- Add a new ERROR_DEFERRED keyword which behaves like SEND_ERROR, but also records the location and message internally and repeats both at the end so that they are not lost in the output.
- Change the behavior of SEND_ERROR to match ERROR_DEFERRED when the newly added policy is set to
When the newly added policy is unset or set to
ERROR_DEFERRED should not be recognised keywords and would therefore be considered the start of the message itself to preserve backward compatibility.