CDbException.php 942 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * CDbException class file.
  4. *
  5. * @author Qiang Xue <qiang.xue@gmail.com>
  6. * @link http://www.yiiframework.com/
  7. * @copyright 2008-2013 Yii Software LLC
  8. * @license http://www.yiiframework.com/license/
  9. */
  10. /**
  11. * CDbException represents an exception that is caused by some DB-related operations.
  12. *
  13. * @author Qiang Xue <qiang.xue@gmail.com>
  14. * @package system.db
  15. * @since 1.0
  16. */
  17. class CDbException extends CException
  18. {
  19. /**
  20. * @var mixed the error info provided by a PDO exception. This is the same as returned
  21. * by {@link http://www.php.net/manual/en/pdo.errorinfo.php PDO::errorInfo}.
  22. * @since 1.1.4
  23. */
  24. public $errorInfo;
  25. /**
  26. * Constructor.
  27. * @param string $message PDO error message
  28. * @param integer $code PDO error code
  29. * @param mixed $errorInfo PDO error info
  30. */
  31. public function __construct($message,$code=0,$errorInfo=null)
  32. {
  33. $this->errorInfo=$errorInfo;
  34. parent::__construct($message,$code);
  35. }
  36. }