Changeset 237
- Timestamp:
- 01/08/08 00:22:37 (1 year ago)
- Files:
-
- trunk/htdocs/index.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/htdocs/index.php
r208 r237 11 11 */ 12 12 13 ini_set('error_reporting', E_ALL & ~E_NOTICE); 13 // ini_set('error_reporting', E_ALL & ~E_NOTICE); 14 ini_set('error_reporting', E_ALL); 14 15 15 16 if(!isset($_GET['module'])) { … … 34 35 $controller = $_GET['Controller']; 35 36 } 36 $result = Framework::start('Default', $controller); 37 if (PEAR::isError($result)) { 38 switch ($result->getCode()) { 37 try { 38 Framework::start('Default', $controller); 39 } catch (Framework_Exception $e) { 40 switch ($e->getCode()) { 39 41 case FRAMEWORK_ERROR_AUTH: 40 42 header('Location: ./?module=Login'); 41 43 break; 42 44 default: 43 // If a PEAR error is returned usually something catastrophic 44 // happend like an event returning a PEAR_Error or throwing an 45 // exception of some sort. 46 die($result->getMessage()); 45 die($e->getMessage()); 47 46 } 48 47 }
