Error Handling in the InterBase Install API
From InterBase
Go Up to About the InterBase Install API
Each of the functions in the InterBase Install API returns a message number as follows:
- If the function executes successfully, it returns zero (
isc_install_success
). - If it completes with warnings, it returns a negative number that corresponds to a specific warning message.
- If an error occurs, it returns a positive number that corresponds to a specific error message.
You should check the return each time you call a function. If the return is nonzero, call isc_install_get_message()
to get the text of the error or warning. For example:
error = isc_install_precheck(handle, source_path, dest_path) if(error) isc_install_get_message(error, message, length(message))
The steps in Overview of the Process do not explicitly remind you to do this. It is assumed that you will do so as necessary.