getLogMsg().' index.php?'.$_SERVER['QUERY_STRING'] ); header('http/1.0 404 Ok'); header('location: /notfound/'); //include('404.html'); // страница по умолчанию, если ошибочное обращение exit; } // если фатальный параметр неверный, перенаправляем на главную страницу catch (EParameterFatal $ex) { logMsg( get_class($ex).' exception occured: '.$ex->getLogMsg().' index.php?'.$_SERVER['QUERY_STRING'] ); header('Location: /'); exit; } // если параметр неверный, делаем rollback catch (EParameter $ex) { logMsg( get_class($ex).' exception occured: '.$ex->getLogMsg().' index.php?'.$_SERVER['QUERY_STRING'] ); // if ($objInpData = $ex->getInpData()) { // cms_doRollback($ex->getInpData()); // } exit (/*'proc.php: rollback'*/); // ... } // иначе перенаправляем на страницу ошибок catch (ESystem $ex) { logMsg( get_class($ex).' exception occured: '.$ex->getLogMsg().' index.php?'.$_SERVER['QUERY_STRING'] ); $strMsg = 'Системная ошибка'; header('Location: /gallery/error.php?text='.urlencode($strMsg)); } catch (EDatabase $ex) { logMsg( get_class($ex).' exception occured: '.$ex->getLogMsg().' index.php?'.$_SERVER['QUERY_STRING'] ); $strMsg = 'Системная ошибка'; header('Location: /gallery/error.php?text='.urlencode($strMsg)); } catch (Exception $ex) { logMsg( get_class($ex).' exception occured: '.$ex->getLogMsg().' index.php?'.$_SERVER['QUERY_STRING'] ); if(defined('CMS_DEBUG')) { header('Location: /gallery/error.php?text='.urlencode($ex->getLogMsg())); exit; } $strMsg = 'Ошибка системы'; header('Location: /gallery/error.php?text='.urlencode($strMsg)); } if(defined('CMS_DEBUG')) echo 'страница создана за '.getSpendTime($time_start).' секунд'; ?>