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

search for in the

Exception::getTrace> <Exception::getFile
Last updated: Fri, 13 Nov 2009

view this page in

Exception::getLine

(PHP 5 >= 5.1.0)

Exception::getLine例外が発生した行を取得する

説明

final public int Exception::getLine ( void )

例外がスローされた行番号を返します。

パラメータ

この関数にはパラメータはありません。

返り値

例外がスローされた行番号を返します。

例1 Exception::getLine() の例

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

上の例の出力は、 たとえば以下のようになります。

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, 13 Nov 2009
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites