PHPマニュアル/PEARマニュアル | ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot

Error::getLine - Gets the line in which the error occurred | JavaScript入門&応用&リファレンスなら「JavaScriptist」

  

Error::getLine

(バージョン情報なし。おそらく SVN 版にしか存在しないでしょう)

Error::getLineGets the line in which the error occurred

説明

final public int Error::getLine ( void )

Get line number where the error occurred.

パラメータ

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

返り値

Returns the line number where the error occurred.

例1 Error::getLine() example

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

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

The error was created on line: 3

参考

  • Throwable::getLine() - オブジェクトのインスタンスが作られた行番号を取得する


忘却曲線を使ってこの知識を確実に記憶に残す

フォーラムで「Error::getLine - Gets the line in which the error occurred」について話す
各種マニュアル: PHPマニュアル | PEARマニュアル | Smarty(英語)マニュアル | PHP-GTKマニュアル | Error::getLine - Gets the line in which the error occurred」をGoogle検索
copyright © 1997-2024 PHP ドキュメント作成グループ(ライセンス). provided by php spot. マニュアル: