forked from hestiacp/hestiacp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.init.php
More file actions
37 lines (34 loc) · 988 Bytes
/
Copy pathapp.init.php
File metadata and controls
37 lines (34 loc) · 988 Bytes
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
<?php
define('V_ROOT_DIR', dirname(__FILE__) . DIRECTORY_SEPARATOR);
require_once V_ROOT_DIR . 'config/Config.class.php';
require_once V_ROOT_DIR . 'core/Vesta.class.php';
require_once V_ROOT_DIR . 'core/exceptions/SystemException.class.php';
require_once V_ROOT_DIR . 'core/exceptions/ProtectionException.class.php';
require_once V_ROOT_DIR . 'core/utils/Message.class.php';
require_once V_ROOT_DIR . 'core/Request.class.php';
require_once V_ROOT_DIR . 'api/AjaxHandler.php';
/**
* App execution
*
* @author Malishev Dima <dima.malishev@gmail.com>
* @author vesta, http://vestacp.com/
* @copyright vesta 2010-2011
*/
try {
// Execution
AjaxHandler::makeReply(
AjaxHandler::getInstance()->dispatch(new Request())
);
}
//
// Errors handling
//
catch (SystemException $e) {
AjaxHandler::systemError($e);
}
catch (ProtectionException $e) {
AjaxHandler::protectionError($e);
}
catch (Exception $e) {
AjaxHandler::generalError($e);
}