Page tree

Skip to end of metadata
Go to start of metadata

In this section:


This error is generated when a program violates a rule specified in an interface module. These normally check that parameters passed to system level or user functions fall within legal ranges or are otherwise valid. This behavior is different from the RETURN_FAILURE error code, which normally indicates that the call to the function was made with valid data, but that it still returned an error for some, possibly anticipated, reason.

USER_ERRORUser-generated error message(tick)RuntimeWindows/Unix


User error problems fall into many different categories. In the following example,  the sqrt function is called and passed a negative argument.

 * File: usererr.c
#include <math.h>

	double q;

	q = sqrt(-2.0);
	return (0);

Diagnosis at Runtime

[usererr.c:10] **USER_ERROR**
>>		 q = sqrt(-2.0);
Negative number -2.000000 passed to sqrt:
Stack trace where the error occurred:
			main() usererr.c, 10
  • Line 2: Source line at which the problem was detected.
  • Line 3: Description of the error and the parameters used.
  • Line 4: Stack trace showing the function call sequence leading to the error. 


Each message in this category is caused by a different problem, which should be evident from the printed diagnostic. Usually, these checks revolve around the legality of various arguments to functions. These messages can be suppressed by suppressing USER_ERROR in the Suppressions Control Panel.

  • No labels