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

ResourceBundle::getErrorMessage - バンドルの直近のエラーメッセージを取得する | JavaScript入門&応用&リファレンスなら「JavaScriptist」

  

ResourceBundle::getErrorMessage

resourcebundle_get_error_message

(PHP >= 5.3.2, PECL intl >= 2.0.0)

ResourceBundle::getErrorMessage -- resourcebundle_get_error_messageバンドルの直近のエラーメッセージを取得する

説明

オブジェクト指向型

public string ResourceBundle::getErrorMessage ( void )

手続き型

string resourcebundle_get_error_message ( ResourceBundle $r )

バンドルオブジェクトが最後に実行した関数のエラーメッセージを取得します。

パラメータ

r

ResourceBundle オブジェクト。

返り値

バンドルオブジェクトの最後の関数コールからのエラーメッセージを返します。

例1 resourcebundle_get_error_message() の例

<?php
$r 
resourcebundle_create'es'"/usr/share/data/myapp");
echo 
$r['somestring'];
if(
intl_is_failure(resourcebundle_get_error_code($r))) {
    
report_error("Bundle error: ".resourcebundle_get_error_message($r));
}
?>

例2 オブジェクト指向の例

<?php
$r 
= new ResourceBundle'es'"/usr/share/data/myapp");
echo 
$r['somestring'];
if(
intl_is_failure(ResourceBundle::getErrorCode($r))) {
    
report_error("Bundle error: ".ResourceBundle::getErrorMessage($r));
}
?>

参考


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

フォーラムで「ResourceBundle::getErrorMessage - バンドルの直近のエラーメッセージを取得する」について話す
各種マニュアル: PHPマニュアル | PEARマニュアル | Smarty(英語)マニュアル | PHP-GTKマニュアル | ResourceBundle::getErrorMessage - バンドルの直近のエラーメッセージを取得する」をGoogle検索
copyright © 1997-2024 PHP ドキュメント作成グループ(ライセンス). provided by php spot. マニュアル: