Interstage Shunsaku Data Manager Application Development Guide - Microsoft(R) Windows(R) 2000/ Microsoft(R) Windows Server(TM) 2003 - - UNIX -
Contents Index PreviousNext

Part 2 Developing Applications by APIs> Chapter 11 Developing C Applications> 11.2 How to Use C APIs> 11.2.5 Error Handling

11.2.5.1 An Example of Error Handling

This section explains an example of how to handle when the error occurs.

mark1Process Flow

The point to be rerun will be separated by the error level when the error occurs. The following figure shows how to separate the rerun process by an error level.

[Figure 11-26 Error Handling]

mark2(1) When an error has occurred due to an incorrect parameter, etc

The SHUN_ERROR_DATA will be returned. In this case, rerun the process that has failed again after recorrecting the parameter.

mark2(2) When the transaction is cancelled

The SHUN_ERROR_TRANSACTION (*1) will be returned. In this case, rerun the process from the point where the transaction is started (*2).

*1) The error level that is returned only when the auto commit is invalid. This error level will not be returned when the the auto commit is valid.
*2) From the API, users will not be able to start the transaction specifically. The transaction will be started automatically by the initial data update process after the auto commit is invalid.

mark2(3) When the connection to Shunsaku is closed forcibly

The SHUN_ERROR_CONNECTION will be returned. In this case, release the connection handle where the error has occurred. Re-allocate the connection handle and then re-execute the process starting from establishing the connection.

mark1Notes

If the network error (an error because the machine and/or conductor has not started) has occurred while establishing the connection, the SHUN_ERROR_DATA will be returned. In this case, re-execute the process starting from establishing the connection as same as when the SHUN_ERROR_CONNECTION is returned.


Contents Index PreviousNext

All Rights Reserved, Copyright(C) FUJITSU LIMITED 2006