endurox.tpgetrply

endurox.tpgetrply(cd: int, flags: int = 0) endurox.TpReplyCd

Get reply message for asynchronous call initiated by tpacall(). Exception is throw in case if error occurs other than TPESVCFAIL, in which case returned tperrno value contains TPESVCFAIL value.

tpgetrply example
    cd = e.tpacall("EXBENCH", { "data":{"T_STRING_FLD":"Hi Jim"}})
    tperrno, tpurcode, retbuf, cd = e.tpgetrply(cd)

For more details see tpgetrply(3) C API call.

Raises:

AtmiException

Following error codes may be present:
TPEINVAL - Invalid arguments to function.
TPEBADDESC - Call descriptor passed in cd is not valid, and TPGETANY flag was not specified.
TPETIME - Destination queue was full/blocked on time-out expired.
TPESVCERR - Service crashed.
TPEBLOCK - Blocking condition found and TPNOBLOCK flag was specified
TPEITYPE - Service error during input buffer handling.
TPETRAN - Service/server failed to start auto-tran.
TPEITYPE - Buffer type not supported by service.
TPESYSTEM - System error.
TPEOS - Operating system error.

Parameters:
Returns:

  • int – tperrno - error code (0 or TPESVCFAIL)

  • int – tpurcode - code passed to tpreturn(3) by the server

  • dict – ATMI buffer returned from the server.