axl_bool vortex_frame_is_error_message ( VortexFrame frame,
char **  code,
char **  message 
)

Allows to check if the given frame contains a BEEP error message inside the frame payload.

The function not only returns if the frame is an error message but also returns the error code and the textual message.

This function expects to receive a BEEP error message as part of the profile being implemented. This function shouldn't be used to general error checking. The function expects a particular error reply format, that is, the BEEP error message:

1 <error code='501'>textual error reported</error>

If your intention is to check a generic error message received, with a different format, you could use vortex_frame_get_type, looking at VORTEX_FRAME_TYPE_ERR. This is a generic recomendation because some profiles uses only MSG/RPY, implementing the error reporting inside the message content received.

Parameters
frameThe frame to check for error message inside.
codeThe error code the error message have (if defined). This value must be deallocated by calling to axl_free.
messageThe textual error message (if defined). This value must be deallocated by calling to axl_free.
Returns
axl_true if the frame contains an error message, axl_false if not.

References vortex_channel_validate_err().