From PHRETS
Syntax
Error ( )
Returns information back about the last request's error
Parameters
- None
Return Values
- Array
- Array contains 3 items:
- type - Type of error. Possible types: http, xml, rets, phrets
- code - Error code. If http type, contains HTTP response code. If rets type, contains RETS ReplyCode. If xml or phrets, always -1.
- text - Error text. If http type, contains HTTP body from error. If rets type, contains RETS ReplyText. If xml or phrets, contains text explaining error.
-
Examples
$error_info = $rets->Error();
if ($error_info['type'] == "rets") {
echo "RETS error (code {$error_info['code']}): {$error_info['text']}";
}