Exception::getLine
(PHP 5 >= 5.1.0)
Exception::getLine — Gets 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
Exception::getLine
There are no user contributed notes for this page.
