Using the MESSAGE_TEXT Keyword The MESSAGE_TEXT keyword returns the message text of the exception (for example, an error message).