Ejemplo n.º 1
0
function handleShutdown()
{
    v6_debug::dump();
    // 12/28/2014 - set the cookie.  May not want this in production if there is an error, etc.  You may need to move
    // this into the if clause below
    v6_cookie::set();
    @ob_end_flush();
    $error = error_get_last();
    if ($error !== NULL && $error['type'] == 1) {
        //        ob_end_clean();   // silently discard the output buffer contents.
        //        appSendMsgToVern('Error has occurred',$error);
        //        header( 'location:/fatal_error' );
        @ob_end_flush();
        // output what is stored in the internal buffer  (may not want this here in production)
        echo '<pre>' . var_export($error, true);
        v6_BackTrace();
        die('handleShutdown(): Cannot continue!');
    } else {
        @ob_end_flush();
        // output what is stored in the internal buffer
    }
}