PageRenderTime 9ms CodeModel.GetById 1ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/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
 9error_reporting(E_ALL);
10
11if(php_sapi_name() == "cli")
12{
13	include(zoop_dir . '/boot/error/CliErrorHandler.php');
14	//set_error_handler(array("CliErrorHandler", "handleError"), E_ALL);
15	set_error_handler(array("CliErrorHandler", "throwException"), E_ALL);
16	set_exception_handler(array("CliErrorHandler", "exceptionHandler"));
17}
18else
19{
20	include(zoop_dir . '/boot/error/WebErrorHandler.php');
21	// set_error_handler(array("WebErrorHandler", "throwException"), E_ALL);
22	set_error_handler(array("WebErrorHandler", "handleError"), E_ALL);
23	set_exception_handler(array("WebErrorHandler", "exceptionHandler"));
24}