Exemplo n.º 1
0
function _debug()
{
    \Faid\Debug\displayCallerCode(1);
    $data = func_get_args();
    foreach ($data as $key => $row) {
        var_dump($row);
    }
    die;
}
Exemplo n.º 2
0
 /**
  * @param        $errno
  * @param        $errstr
  * @param string $errfile
  * @param string $errline
  */
 public function onError($errno, $errstr, $errfile = '', $errline = '')
 {
     try {
         $this->sendHeader(404);
         $this->checkIfCMSStarted();
         $this->setupErrorProcessingFlag();
         $errorDescription = sprintf('Error [%d]: %s', $errno, $errstr);
         //
         $this->template = VIEW_PATH . 'errors/custom.tpl';
         //
         $this->prepareParseData();
         //
         if (CMSAuth::getInstance()->isLogined()) {
             $add = array();
             // add stack trace
             //debug::out( $errfile, $errline );
             if (!empty($errfile)) {
                 $add['source'] = debug::getFileSource($errfile, $errline);
             }
             $add['description'] = $errorDescription;
             // one for current call, one for render method, one for error handler
             $add['trace'] = \Faid\Debug\displayCallerCode(2, false);
             $this->set('errorDescription', $add);
         }
         $this->output($this->template, array(), array('Error.Render'));
     } catch (\Exception $e) {
         faidErrorRenderer::render($errno, $errstr, $errfile, $errline);
         print nl2br($e);
     }
 }