when you are using xdebug, exceptions message will never be shown if you use any encoding different than UTF-8, so if you are using any database with translated messages like oracle, you should ALWAYS, always, throw a exception like this
throw new Exception(utf8_encode($message),$code), character like ã,é,ç, will make the exception message fail to be shown, if you are not using xdebug ( I do think you should at least try), this code will not affect your page.
Exception
(PHP 5 >= 5.1.0)
Introdução
Exception é a classe base para todas Exceptions.
Sinopse da classe
Exception
{
/* Properties */
/* Methods */
}Propriedades
- message
-
A mensagem da exceção
- string
-
Nome interno da exceção
- code
-
O código da exceção
- file
-
O nome do arquivo onde a exceção foi disparada
- line
-
A linha onde a exceção foi disparada
- trace
-
A stack trace
Índice
- Exception::__construct — Construtor da exceção
- Exception::getMessage — Obtém a mensagem da exceção
- Exception::getCode — Obtém o código da exceção
- Exception::getFile — Obtém o arquivo no qual a exceção ocorreu
- Exception::getLine — Obtém a linha na qual a exceção ocorreu
- Exception::getTrace — Obtém a stack trace
- Exception::getTraceAsString — Obtém a stack trace como uma string
- Exception::__toString — Representação string da exceção
- Exception::__clone — Clona a exceção
altieresdelsent at gmail dot com ¶
7 months ago
