Commit 625305a1784b39fef3933e6e3af562af635611e3

Authored by Deepseath
1 parent 33064f2f

完善错误报告内容

Showing 1 changed file with 2 additions and 1 deletions
src/Hris.php
... ... @@ -196,6 +196,7 @@ class Hris
196 196 } elseif ($method == 'get') {
197 197 $response = $this->_http->get($url, $data);
198 198 }
  199 + $body = $response->body();
199 200 $result = $response->json(true);
200 201 $this->log($result, 'Result');
201 202 if (!isset($result['code']) || $result['code'] != 200) {
... ... @@ -207,7 +208,7 @@ class Hris
207 208 if (isset($result['msg']) && isset($result['code'])) {
208 209 throw new \Exception('hris SDK Error: ' . $result['msg'] . ':' . $result['code'] . '='. print_r($result, true), $result['code']);
209 210 } else {
210   - throw new \Exception('hris SDK Error: Result NULL.' .var_export($result, true), 9999);
  211 + throw new \Exception('hris SDK Error: Result NULL.' .var_export($result, true) . var_export($body, true), 90001);
211 212 }
212 213 }
213 214  
... ...