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)
Introducción
Exception es la clase base para todas las excepciones.
Sinopsis de la Clase
Exception
{
/* Propiedades */
/* Métodos */
}Propiedades
- message
-
El mensaje de la excepción
- code
-
El código de la excepción
- file
-
El nombre del fichero donde se originó la excepción
- line
-
La línea donde se originó la excepción
Tabla de contenidos
- Exception::__construct — Constructor de la excepción
- Exception::getMessage — Obtiene el mensaje de Excepción
- Exception::getPrevious — Devuelve la excepción anterior
- Exception::getCode — Obtiene el código de Excepción
- Exception::getFile — Obtiene el fichero en el que ocurrió la excepción
- Exception::getLine — Obtiene la línea en donde ocurrió la excepción
- Exception::getTrace — Obtiene el seguimiento de la pila
- Exception::getTraceAsString — Obtiene el stack trace como cadena
- Exception::__toString — Representación de la excepción en formato cadena
- Exception::__clone — Clona la excepción
altieresdelsent at gmail dot com ¶
8 months ago
