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

search for in the

Exception::__clone> <Exception::getTraceAsString
[edit] Last updated: Fri, 07 Jun 2013

view this page in

Exception::__toString

(PHP 5 >= 5.1.0)

Exception::__toStringRepresentación de la excepción en formato cadena

Descripción

public string Exception::__toString ( void )

Devuelve la representación de la excepción en formato string.

Parámetros

Esta función no tiene parámetros.

Valores devueltos

Devuelve la representación de la excepción en formato string.

Ejemplos

Ejemplo #1 Ejemplo de Exception::__toString()

<?php
try {
    throw new 
Exception("Some error message");
} catch(
Exception $e) {
    echo 
$e;
}
?>

El resultado del ejemplo sería algo similar a:

exception 'Exception' with message 'Some error message' in /home/bjori/tmp/ex.php:3
Stack trace:
#0 {main}



add a note add a note User Contributed Notes Exception::__toString - [0 notes]
There are no user contributed notes for this page.

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