iTP Active Transaction Pages (iTP ATP) Programmer's Guide
ATP Objects, Properties, and Methods
iTP Active Transaction Pages (iTP ATP) Programmer’s Guide—522292-002
4-12
Exception and Error Information
Return Value
None.
ATPException
ATP will return a “postXML is not a function” error message if the XML add-on
package is not installed properly. Otherwise, the possible error codes are:
•
ATP_ERR_DOM_INVALID_PARAM_TYPE(4): The argument is not an
XMLDOMDocument object.
•
ATP_HTTP_INVALID_URL(2): The host name is not initialized properly.
•
ATP_HTTP_CREATE_FAILED(101): Internal socket error. Cannot create a
new socket.
•
ATP_HTTP_CONNECT_FAILED(102): Server is not available or the host
name or address is invalid.
•
ATP_HTTP_HEADER_TOO_LONG(202): The request header reached the
maximum size limit (16K bytes).
•
ATP_HTTP_SEND_FAILED(103): Internal socket write failed.
•
ATP_HTTP_READ_FAILED(104): Internal socket read failed. The error may
be caused by an AWAITIOX function timeout (errorDetail = 40).
You can check the detail error code from the errorDetail property defined in the
outstanding ATPException object.
Exception and Error Information
An ATPException object might be thrown while executing the HTTP methods. To
prevent the program from stopping on any exception, you should use a try-catch block to
check the error information and recover from any exception.
The following list shows the possible values for the error property of the ATPException
object:
•
ATP_HTTP_OK(0)
•
ATP_HTTP_SERVER_ERROR(1): An HTTP server error was found.
•
ATP_HTTP_INVALID_URL(2): Invalid host, path, or query string.
•
ATP_ERR_DOM_INVALID_PARAM_TYPE(4): The argument is not an
XMLDOMDocument object.
•
ATP_HTTP_NO_MEMORY(10): Out of Memory.
•
ATP_HTTP_NULL_POINTER(11): Internal null pointer error.
•
ATP_HTTP_NO_CONNECTION(12): No connection or connection closed prior to
socket operations.
•
ATP_HTTP_SOCKET_INVALID(100): Internal error.