xPCErrorMsg

Return text description for error message

Prototype

char *xPCErrorMsg(int error_number, char *error_message);

Note

Do not use this C API type definition. Support for this type definition relies on support for the C API, which will be removed in a future release.

Arguments

error_number

Enter the constant of an error.

error_message

The xPCErrorMsg function copies the error message character string into the buffer pointed to by error_message. error_message is then returned. You can later use error_message in a function such as printf.

If error_message is NULL, the xPCErrorMsg function returns a pointer to a statically allocated character string.

Return

Returns a character string associated with the error error_number.

Description

The xPCErrorMsg function returns error_message, which makes it convenient to use in a printf or similar statement. Use the xPCGetLastError function to get the constant for which you are getting the message.

Introduced before R2006a