SAMConnection->errno

(no version information, might be only in CVS)

SAMConnection->errno -- 最後に実行した SAM 操作のエラーコードを表す数値を含む

説明

class SAMConnection {

int errno

}

errno() には、この接続で最後に実行された SAM 操作のエラーコードを表す数値が含まれます。 直近の操作が正常に終了した場合は、このプロパティは 0 となります。

返り値

ゼロより大きい整数値は、この接続の直近のエラーの型を表します。 ゼロの場合は、この接続の直近の操作が正常に終了したことを表します。

例 1. Using the error number and description properties

<?php
$conn
= new SAMConnection();
$conn->connect(SAM_WMQ, array(SAM_HOST => 'localhost', SAM_PORT => 1506));
$msg = new SAMMessage('This is a simple text item');
if (!
$conn->send('topic://test', $msg)) {
    
// The Send failed!
    
echo "Send failed ($conn->errno) $conn->error";
}
?>

参考

SAMConnection->error