/**
  * Creates a new <tt>TineErrorException</tt>.
  * Uses HTTP code 500 - INTERNAL_ERROR
  *
  * @param \stdClass An object that represents the error returned by tine. It two fields: code and message
  */
 public function __construct($tineError)
 {
     $code = isset($tineError->code) ? $tineError->code : '<undefined>';
     $message = isset($tineError->message) ? $tineError->message : '<undefined>';
     parent::__construct("Tine returned an error. Code: {$code}; Message: {$message}");
     $this->tineError = $tineError;
 }
 /**
  * Creates a new <tt>UserMismatchException</tt>.
  * Uses HTTP code 500 - INTERNAL_ERROR
  */
 public function __construct()
 {
     parent::__construct('UserMismatchException', 0, self::HTTP_500_INTERNAL_ERROR);
 }
 /**
  * Creates a new <tt>CaptchaRequiredException</tt>
  *
  * @param string $catcha Base 64 encoded CAPTCHA image.
  */
 public function __construct($captcha)
 {
     parent::__construct('CAPTCHA authentication required', self::HTTP_401_UNAUTHORIZED);
     $this->captcha = $captcha;
 }
 /**
  * Creates a new <tt>NoTineSessionException</tt>.
  * It defaults parent class httpCode to 401.
  *
  * @param string $message The exception message.
  */
 public function __construct($message)
 {
     parent::__construct($message, self::HTTP_401_UNAUTHORIZED);
 }
 /**
  * Creates a new <tt>RpcException</tt>.
  * Uses HTTP code 500 - INTERNAL_ERROR
  *
  * @param string $message The exception message.
  */
 public function __construct($message)
 {
     parent::__construct($message, self::HTTP_500_INTERNAL_ERROR);
 }
 /**
  * Creates a new <tt>TineSessionExpiredException</tt>.
  * Uses HTTP code 401 - UNAUTHORIZED
  */
 public function __construct()
 {
     parent::__construct('User session on Tine is likely to be expired', self::HTTP_401_UNAUTHORIZED);
 }
 /**
  * Creates a new <tt>CurlNotInstalledException</tt>.
  * Uses HTTP code 500 - INTERNAL_ERROR
  */
 public function __construct()
 {
     parent::__construct('CurlNotInstalledException', 0, self::HTTP_500_INTERNAL_ERROR);
 }
 /**
  * Creates a new <tt>DebuggerModuleNotEnabledException</tt>.
  * It defaults parent class httpCode to 401.
  *
  * @param string $message The exception message.
  * @param int $code The exception code used for logging.
  */
 public function __construct($message, $code = 0)
 {
     parent::__construct($message, $code, 401);
 }