Author: Xingda Computer technology company (www.study01job.com) Guo Baoli
There are several reasons for standardizing error handling and status monitoring procedures:
L to be treated uniformly throughout the application;
• Reduce the likelihood of accidental leakage of unique processing;
• Reduce unnecessary hassle in future software maintenance.
The following aspects of the inspection can be considered in a standard way to deal with:
L coupling error;
L Database access error;
L Data entry error;
L Program execution error.
Program execution error handling must clearly indicate the cause of the error or possible.
Database operation errors must indicate a database error code (SQLCA.SQLCODE) and a Database error description (Sqlca.sqlerrtext), that is, the following code must be handled in the database operation error:
"~r~n~r~n Error code:" + String (SQLCA. SQLCODE) &
+ "~r~n~r~n error message:" + SQLCA. Sqlerrtext)