User's Guide > Fundamentals > Creo Toolkit Style > Function Error Statuses
Function Error Statuses
 
The return type of most Creo TOOLKIT functions is ProError. ProError is an enumerated type with a value for each common case where Creo TOOLKIT functions succeeds or fails.
The normal value for success is PRO_TK_NO_ERROR. The other “failure” statuses occur when there is a genuine problem, or for more benign reasons. For example, these error statuses denote genuine problems:
PRO_TK_BAD_INPUTS—The Creo TOOLKIT program called the function incorrectly.
PRO_TK_OUT_OF_MEMORY or PRO_TK_COMM_ERROR—System failure.
The following statuses are more benign:
PRO_TK_USER_ABORT—A function that supports user interaction was aborted by the Creo+ user.
PRO_TK_E_NOT_FOUND—A function attempted operation on an empty object list.
Users must pay careful attention to how their program reacts to a Creo TOOLKIT function error status—there can be several types of failure and success, each requiring different handling.
The subset of ProError values that a particular Creo TOOLKIT function can return is described in the browser under that function. Possible errors are also included in a comment under each function prototype in the corresponding Creo TOOLKIT header file.
这对您有帮助吗?