You are here

public function TwitterException::__construct in Twitter 7.3

Same name and namespace in other branches
  1. 6.3 twitter.lib.php \TwitterException::__construct()

Overrides constructor to log the error.

File

./twitter.lib.php, line 14
Classes to implement the full Twitter API

Class

TwitterException
Exception handling class.

Code

public function __construct($message = NULL, $code = 0, Exception $previous = NULL) {
  watchdog('twitter', 'Unexpected error: @message', array(
    '@message' => $message,
  ), WATCHDOG_ERROR);
  if (is_null($previous)) {
    parent::__construct($message, $code);
  }
  else {
    parent::__construct($message, $code, $previous);
  }
}