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

search for in the

Exception::getTraceAsString> <Exception::getLine
Last updated: Fri, 26 Dec 2008

view this page in

Exception::getTrace

(PHP 5 >= 5.1.0)

Exception::getTraceRécupère la trace de la pile

Description

final public array Exception::getTrace ( void )

Retourne la trace de la pile de l'exception.

Liste de paramètres

Cette fonction ne contient aucun paramètre.

Valeurs de retour

Retourne la trace de la pile de l'exception sous la forme d'un tableau.

Exemples

Exemple #1 Exemple avec Exception::getTrace()

<?php
function test() {
 throw new 
Exception;
}

try {
 
test();
} catch(
Exception $e) {
 
var_dump($e->getTrace());
}
?>

L'exemple ci-dessus va afficher quelque chose de similaire à :

array(1) {
  [0]=>
  array(4) {
    ["file"]=>
    string(22) "/home/bjori/tmp/ex.php"
    ["line"]=>
    int(7)
    ["function"]=>
    string(4) "test"
    ["args"]=>
    array(0) {
    }
  }
}



add a note add a note User Contributed Notes
Exception::getTrace
There are no user contributed notes for this page.

Exception::getTraceAsString> <Exception::getLine
Last updated: Fri, 26 Dec 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites