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

search for in the

Exception::getTrace> <Exception::getFile
Last updated: Fri, 01 Aug 2008

view this page in

Exception::getLine

(PHP 5 >= 5.1.0)

Exception::getLineGets the line in which the exception occurred

Descrierea

final public string Exception::getLine ( void )

Returns line number where the exception was thrown.

Parametri

Această funcţie nu are parametri.

Valorile întroarse

Returns the line number where the exception was thrown.

Exemple

Example #1 Exception::getLine() example

<?php
try {
    throw new 
Exception("Some error message");
} catch(
Exception $e) {
    echo 
"The exception was thrown on line: " $e->getLine();
}
?>

Exemplul de mai sus va afişa ceva similar cu:

The exception was thrown on line: 3



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

Exception::getTrace> <Exception::getFile
Last updated: Fri, 01 Aug 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites