Exception.php 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?php
  2. /**
  3. * Zend Framework
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the new BSD license that is bundled
  8. * with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://framework.zend.com/license/new-bsd
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@zend.com so we can send you a copy immediately.
  14. *
  15. * @category Zend
  16. * @package Zend_Session
  17. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  18. * @license http://framework.zend.com/license/new-bsd New BSD License
  19. * @version $Id$
  20. * @since Preview Release 0.2
  21. */
  22. /**
  23. * @see Zend_Exception
  24. */
  25. #require_once 'Zend/Exception.php';
  26. /**
  27. * Zend_Session_Exception
  28. *
  29. * @category Zend
  30. * @package Zend_Session
  31. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  32. * @license http://framework.zend.com/license/new-bsd New BSD License
  33. */
  34. class Zend_Session_Exception extends Zend_Exception
  35. {
  36. /**
  37. * sessionStartError
  38. *
  39. * @see http://framework.zend.com/issues/browse/ZF-1325
  40. * @var string PHP Error Message
  41. */
  42. static public $sessionStartError = null;
  43. /**
  44. * handleSessionStartError() - interface for set_error_handler()
  45. *
  46. * @see http://framework.zend.com/issues/browse/ZF-1325
  47. * @param int $errno
  48. * @param string $errstr
  49. * @return void
  50. */
  51. static public function handleSessionStartError($errno, $errstr, $errfile, $errline, $errcontext)
  52. {
  53. self::$sessionStartError = $errfile . '(Line:' . $errline . '): Error #' . $errno . ' ' . $errstr;
  54. }
  55. /**
  56. * handleSilentWriteClose() - interface for set_error_handler()
  57. *
  58. * @see http://framework.zend.com/issues/browse/ZF-1325
  59. * @param int $errno
  60. * @param string $errstr
  61. * @return void
  62. */
  63. static public function handleSilentWriteClose($errno, $errstr, $errfile, $errline, $errcontext)
  64. {
  65. self::$sessionStartError .= PHP_EOL . $errfile . '(Line:' . $errline . '): Error #' . $errno . ' ' . $errstr;
  66. }
  67. }