Cgiapp2
[ class tree: Cgiapp2 ] [ index: Cgiapp2 ] [ all elements ]

Source for file Error.class.php

Documentation is available at Error.class.php

  1. <?php
  2. /**
  3. * Cgiapp2 - Framework for building reusable web-applications
  4. *
  5. * A PHP5 port of perl's CGI::Application, a framework for building reusable web
  6. * applications.
  7. *
  8. * @package Cgiapp2
  9. * @author Matthew Weier O'Phinney <mweierophinney@gmail.com>; based on
  10. * CGI::Application, by Jesse Erlbaum <jesse@erlbaum.net>, et. al.
  11. * @copyright (c) 2004 - present, Matthew Weier O'Phinney
  12. * @license BSD License (http://www.opensource.org/licenses/bsd-license.php)
  13. * @category Tools and Utilities
  14. * @tutorial Cgiapp2/Cgiapp2.cls
  15. * @version $Id:$
  16. */
  17.  
  18. /**
  19. * Extends Cgiapp2_Exception
  20. */
  21. require_once 'Cgiapp2/Exception.class.php';
  22.  
  23. /**
  24. * Cgiapp2 Error -> Exception Handling
  25. *
  26. * This class is used to turn errors into exceptions for Cgiapp2. It is derived
  27. * from a comment found at:
  28. *
  29. * http://www.zend.com/php5/articles/php5-exceptions.php
  30. *
  31. * @package Cgiapp2
  32. * @copyright (c) 2006 - present, Matthew Weier O'Phinney
  33. * <mweierophinney@gmail.com>
  34. * @version @release-version@
  35. */
  36. class Cgiapp2_Exception_Error extends Cgiapp2_Exception
  37. {
  38. /**
  39. * Create an Exception from an Error
  40. *
  41. * Creates a Cgiapp2_Exception_Error from a PHP error (if the PHP error
  42. * handler has been set to this method).
  43. *
  44. * @static
  45. * @access public
  46. * @throws Cgiapp2_ErrorException
  47. */
  48. public static function handler($errno, $errstr)
  49. {
  50. throw new Cgiapp2_Exception_Error($errstr, $errno);
  51. }
  52. }

Documentation generated on Sat, 03 Jun 2006 10:48:41 -0400 by phpDocumentor 1.3.0RC5