/framework/boot/error/Error.php

http://zoop.googlecode.com/ · PHP · 24 lines · 14 code · 2 blank · 8 comment · 2 complexity · 5180c5c8dbb728b2123672fbfae0ef6f MD5 · raw file

  1. <?php
  2. /**
  3. * class Error Handler
  4. *
  5. * @package app
  6. * @author Rick Gigger
  7. **/
  8. error_reporting(E_ALL);
  9. if(php_sapi_name() == "cli")
  10. {
  11. include(zoop_dir . '/boot/error/CliErrorHandler.php');
  12. //set_error_handler(array("CliErrorHandler", "handleError"), E_ALL);
  13. set_error_handler(array("CliErrorHandler", "throwException"), E_ALL);
  14. set_exception_handler(array("CliErrorHandler", "exceptionHandler"));
  15. }
  16. else
  17. {
  18. include(zoop_dir . '/boot/error/WebErrorHandler.php');
  19. // set_error_handler(array("WebErrorHandler", "throwException"), E_ALL);
  20. set_error_handler(array("WebErrorHandler", "handleError"), E_ALL);
  21. set_exception_handler(array("WebErrorHandler", "exceptionHandler"));
  22. }