Skip to Main Content Skip to Search
Product Documentation

xPCErrorMsg - Return text description for error message

Prototype

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

Arguments

error_number

Enter the constant of an error.

error_message

The xPCErrorMsg function copies the error message 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 string.

Return

The xPCErrorMsg function returns a 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.

See Also

API functions xPCSetLastError, xPCGetLastError

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS