. * * @category Exception * @package StatusNet * @author Evan Prodromou * @copyright 2008-2010 StatusNet, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } /** * Class for server exceptions * * Subclass of PHP Exception for server errors. The user typically can't fix these. * * @category Exception * @package StatusNet * @author Evan Prodromou * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ class ServerException extends Exception { public function __construct($message = null, $code = 400) { parent::__construct($message, $code); } public function __toString() { return __CLASS__ . ": [{$this->code}]: {$this->message}\n"; } }