Changeset 16931


Ignore:
Timestamp:
2007/12/19 16:40:57 (13 years ago)
Author:
adachi
Message:

DBエラー時のエラー表示ページ追加

Location:
branches/feature-module-update/data
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • branches/feature-module-update/data/class/SC_DbConn.php

    r16667 r16931  
    213213        } 
    214214        $url .= $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; 
    215              
    216         $errmsg = $url."\n\n"; 
    217         $errmsg.= "SERVER_ADDR:" . $_SERVER['SERVER_ADDR'] . "\n"; 
    218         $errmsg.= "REMOTE_ADDR:" . $_SERVER['REMOTE_ADDR'] . "\n"; 
    219         $errmsg.= "USER_AGENT:" . $_SERVER['HTTP_USER_AGENT'] . "\n\n";      
    220         $errmsg.= $sql . "\n"; 
    221         $errmsg.= $result->message . "\n\n"; 
    222         $errmsg.= $result->userinfo . "\n\n"; 
    223          
    224         $arrRbacktrace = array_reverse($result->backtrace); 
    225                      
    226         foreach($arrRbacktrace as $backtrace) { 
    227             if($backtrace['class'] != "") { 
    228                 $func = $backtrace['class'] . "->" . $backtrace['function']; 
    229             } else { 
    230                 $func = $backtrace['function'];                  
    231             } 
    232              
    233             $errmsg.= $backtrace['file'] . " " . $backtrace['line'] . ":" . $func . "\n"; 
    234         } 
    235          
    236         if ($this->err_disp || DEBUG_MODE === true) { 
     215 
     216        $errmsg = $url."\n\n"; 
     217        $errmsg.= "SERVER_ADDR:" . $_SERVER['SERVER_ADDR'] . "\n"; 
     218        $errmsg.= "REMOTE_ADDR:" . $_SERVER['REMOTE_ADDR'] . "\n"; 
     219        $errmsg.= "USER_AGENT:" . $_SERVER['HTTP_USER_AGENT'] . "\n\n"; 
     220        $errmsg.= $sql . "\n"; 
     221        $errmsg.= $result->message . "\n\n"; 
     222        $errmsg.= $result->userinfo . "\n\n"; 
     223 
     224        $arrRbacktrace = array_reverse($result->backtrace); 
     225 
     226        foreach($arrRbacktrace as $backtrace) { 
     227            if($backtrace['class'] != "") { 
     228                $func = $backtrace['class'] . "->" . $backtrace['function']; 
     229            } else { 
     230                $func = $backtrace['function']; 
     231            } 
     232 
     233            $errmsg.= $backtrace['file'] . " " . $backtrace['line'] . ":" . $func . "\n"; 
     234        } 
     235 
     236        require_once(CLASS_EX_PATH . "page_extends/error/LC_Page_Error_SystemError_Ex.php"); 
     237 
     238        $objPage = new LC_Page_Error_SystemError_Ex(); 
     239        register_shutdown_function(array($objPage, "destroy")); 
     240        $objPage->init(); 
     241        $objPage->process(); 
     242 
     243        if (DEBUG_MODE == true) { 
    237244            print('<pre>'); 
    238245            print_r(htmlspecialchars($errmsg, ENT_QUOTES, CHAR_CODE)); 
    239246            print('</pre>'); 
    240247        } 
    241                  
     248 
    242249        GC_Utils_Ex::gfPrintLog($errmsg); 
    243250 
Note: See TracChangeset for help on using the changeset viewer.