Changeset 237

Show
Ignore:
Timestamp:
01/08/08 00:22:37 (1 year ago)
Author:
shupp
Message:

check for exception in Framework::start, set error handling to E_ALL for debugging

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/htdocs/index.php

    r208 r237  
    1111 */ 
    1212 
    13 ini_set('error_reporting', E_ALL & ~E_NOTICE); 
     13// ini_set('error_reporting', E_ALL & ~E_NOTICE); 
     14ini_set('error_reporting', E_ALL); 
    1415 
    1516if(!isset($_GET['module'])) { 
     
    3435        $controller = $_GET['Controller']; 
    3536    } 
    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()) { 
    3941        case FRAMEWORK_ERROR_AUTH: 
    4042            header('Location: ./?module=Login'); 
    4143            break; 
    4244        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()); 
    4746        } 
    4847    }