Sets user-defined, alternate error text for the production object.
setErrTxt(string msg);
setErrTxt(“the alternate error message”);
Parameter |
Description |
---|---|
msg |
The alternate error message to append to the error text. Can be a literal value or string object. |
Integer
Always returns 1.
string my_err_msg;
my_err_msg = “Qual33 bit the dust.”;
my_prod.setErrTxt(my_err_msg); //my_prod is a Prod Obj.
my_other_prod.setErrTxt(“Filt42 failed.”);
The seterrtxt() method sets a user-defined error text in the production object. Use this method in production object custom filter, error, generic, or qualification functions to generate a unique error text from each function. This allows you to immediately determine within which function the processing error occurred.
This method does not replace the error text generated by the production object.
When a processing failure occurs, the alternate error text displayed is that of the last function that called setErrTxt(). For example, a custom filter function that calls this method fails, then the error function of the production object that is executed next also uses this method. The error message generated by the production object contains the alternate error text set by the error function, not that set by the custom filter.
Also, when you use this method in a function, it sets the alternate error text regardless of whether or not the function encounters a processing error. Therefore, if the function that fails does not call setErrText(), but a previously executed function did, the alternate error text generated by the Production object does not reflect the function where the processing failure actually occurred.
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |