forked from skymoonmaster/i365day
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
43 lines (42 loc) · 1.34 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
define("APPLICATION_PATH", dirname(__FILE__));
require_once(APPLICATION_PATH . '/application/common/env_init.php');
$app = new Yaf_Application(APPLICATION_PATH . "/conf/application.ini");
/**
* 开启捕获异常
*/
# Yaf_Dispatcher::getInstance()->catchException(TRUE);
try {
$app->bootstrap()->run();
} catch (Exception_BadInput $e) {
Util_CLog::setFile(basename($e->getFile()));
Util_CLog::setLine($e->getLine());
Util_CLog::warning($e->getMessage());
var_dump($e->getMessage());
#header("Location: /error/");
} catch (Exception_Login $e) {
Util_CLog::setFile(basename($e->getFile()));
Util_CLog::setLine($e->getLine());
Util_CLog::warning($e->getMessage());
var_dump($e->getMessage());
#header("Location: /login/index/error/show");
} catch (Exception_Ajax $e) {
Util_CLog::setFile(basename($e->getFile()));
Util_CLog::setLine($e->getLine());
Util_CLog::warning($e->getLogMsg());
var_dump($e->getMessage());
#echo $e->getoutPutMsg();
} catch (Exception $e) {
Util_CLog::setFile(basename($e->getFile()));
Util_CLog::setLine($e->getLine());
Util_CLog::warning($e->getMessage());
var_dump($e->getMessage());
#header("Location: /error/");
}
/**
* The file and line should been cleared for the log without exception
*
*/
Util_CLog::setFile('');
Util_CLog::setLine('');
?>