data(); return array( 'code' => $response->httpCode, 'error' => isset($data['error']) ? $data['error'] : $response->error, 'error_description' => isset($data['error_description']) ? $data['error_description'] : '', ); } return array( 'code' => $code, 'error' => $message, ); // throw new \Exception($message, $code); } /** * @ignore 输出异常信息 * @param string $message 异常信息 * @param int $code 错误码 */ function exception($message, $code = 1) { throw new \Exception($message, $code); }