[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * An exception talking to the Twilio API. This is thrown whenever the Twilio 5 * API returns a 400 or 500-level exception. 6 * 7 * :param int $status: the HTTP status for the exception 8 * :param string $message: a human-readable error message for the exception 9 * :param int $code: a Twilio-specific error code for the exception 10 * :param string $info: a link to more information 11 */ 12 class Services_Twilio_RestException extends Exception { 13 14 /** 15 * The HTTP status for the exception. 16 */ 17 protected $status; 18 19 /** 20 * A URL to get more information about the error. This is not always 21 * available 22 */ 23 protected $info; 24 25 public function __construct($status, $message, $code = 0, $info = '') { 26 $this->status = $status; 27 $this->info = $info; 28 parent::__construct($message, $code); 29 } 30 31 /** 32 * Get the HTTP status code 33 */ 34 public function getStatus() { 35 return $this->status; 36 } 37 38 /** 39 * Get a link to more information 40 */ 41 public function getInfo() { 42 return $this->info; 43 } 44 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |