aboutsummaryrefslogtreecommitdiffstats
path: root/gsxlib.php
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2011-04-29 23:41:29 +0300
committerFilipp Lepalaan <filipp@mac.com>2011-04-29 23:41:29 +0300
commit584981a53ec5c0d1a5b6cf3d4d3f0f374ca6df3f (patch)
tree14e0d49d59af15c162f68167d92601254fc61eca /gsxlib.php
parent30c626889bcaf69afdff190057b794f89970422c (diff)
downloadgsxlib-584981a53ec5c0d1a5b6cf3d4d3f0f374ca6df3f.tar.gz
gsxlib-584981a53ec5c0d1a5b6cf3d4d3f0f374ca6df3f.tar.bz2
gsxlib-584981a53ec5c0d1a5b6cf3d4d3f0f374ca6df3f.zip
more graceful handling of invalid SN, more complete usage example
Diffstat (limited to 'gsxlib.php')
-rw-r--r--gsxlib.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/gsxlib.php b/gsxlib.php
index 60a3fc0..c51639c 100644
--- a/gsxlib.php
+++ b/gsxlib.php
@@ -95,7 +95,13 @@ class GsxLib
'unitDetail' => array('serialNumber' => $serialNumber)
));
- $result = $this->client->WarrantyStatus($a);
+ try {
+ $result = $this->client->WarrantyStatus($a);
+ } catch (SoapFault $e) {
+ trigger_error($e->getMessage());
+ return FALSE;
+ }
+
return $result->WarrantyStatusResponse->warrantyDetailInfo;
}