* @copyright 2013 Mauro Cavalcanti Brizida * @version Release: 2.0 * @last modify 22/04/2013 * * * * @expl: (* = must have) try{ throw new \exception('MYSQLI CLASS - Não foi possivel connectar com banco de dados: ' .$this->connect_error); }catch(\exception $e){ $errorcode = $e->getCode(); $text = $e->getMessage(); $file = $e->getFile(); $line = $e->getLine(); \core\excep::exception($errorcode, $text, $file, $line); } * */ class excep{ public static function exception($errorcode = NULL, $text = NULL, $file = NULL, $line = NULL){ if($text == 'unlink(/virtual/duloren.com.br/www/uploads/modelos/): Is a directory') return; if(preg_match('/function\.unlink/', $text) == 1) return; if(\core\conf::conf('ERROR_HAND') == 'ignore') return; $img = \core\conf::conf('HTTP_BASE'). 'img/error.png'; switch ($errorcode) { case E_USER_ERROR: $title = 'YOU ERROR'; break; case E_USER_WARNING: $title = 'WARNING'; break; case E_USER_NOTICE: $title = 'NOTICE'; break; default: $title = "ERROR"; break; } $info = PHP_VERSION; $html = <<
# $file
#
# $title - code: $errorcode
# $text
#
# Line: $line
#
# PHP: $info
AQUI; die(print($html)); } } ?> Duloren
LOJISTA