Duangw

错误消息处理

索引:

  1. 全局变量tperrno
  2. 错误函数tpstrerror

1.全局变量tperrno

当一个ATMI调用发生错误时,全局变量tperrno被设置,它指示发生错误的原因。可选值如下:

代码 解释
TPEABORT Transaction can not commit
TPEBADDESC Bad descriptor for tpgetrply(3c)
TPEBLOCK Blocking condition found and no-block specified
TPEINVAL Invalid arguments given
TPELIMIT Too many handles outstanding
TPENOENT No entry found or no room on the Bulletin Board
TPEOS Operating system error
TPEPERM Bad permissions or failed authentication
TPEPROTO Protocol error
TPESVCERR Server error while handling request
TPESVCFAIL Application level service failure
TPESYSTEM Internal BEA TUXEDO error (userlog(3c)) message written)
TPETIME Time-out occurred and TPNOTIME was not specified
TPETRAN Caller in transaction mode and transaction aborted
TPGOTSIG Signal received and TPSIGRSTRT not specified
TPERMERR Resource Manager failure
TPEITYPE Type and/or subtype do not match services
TPEOTYPE Type and/or subtype do not match buffers or unknown
TPERELEASE Caller has made a 3.0 library call
TPEHAZARD Hazard exists that transaction heuristically completed
TPEHEURISTIC Transaction heuristically completed
TPEEVENT Event occurred
TPEMATCH Service name cannot be advertised due to matching conflict

 

2.错误函数tpstrerror

char *tpstrerror(int tperrno);

根据错误号tperrno生成一个错误信息串,把串的起始地址返回。

当错误是TPESYSTEM或TPEOS时,一个消息写到userlog文件。