downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

Exception::getPrevious> <Exception::__construct
[edit] Last updated: Fri, 07 Jun 2013

view this page in

Exception::getMessage

(PHP 5 >= 5.1.0)

Exception::getMessageObtiene el mensaje de Excepción

Descripción

final public string Exception::getMessage ( void )

Devuelve el mensaje de Excepción.

Parámetros

Esta función no tiene parámetros.

Valores devueltos

Devuelve el mensaje de Excepción en formato cadena.

Ejemplos

Ejemplo #1 Ejemplo de Exception::getMessage()

<?php
try {
    throw new 
Exception("Algún mensaje de error");
} catch(
Exception $e) {
    echo 
$e->getMessage();
}
?>

El resultado del ejemplo sería algo similar a:

Algún mensaje de error



add a note add a note User Contributed Notes Exception::getMessage - [1 notes]
up
-3
support resort
4 years ago
<?php
$client
= new SoapClient ("http://example.com");
try {
   
$response = $client->Client_Function();
} catch(
SoapFault  $e) {
    echo
$e->getMessage();
}
?>

 
show source | credits | stats | sitemap | contact | advertising | mirror sites