Internationalization ResourceBundle::getErrorMessage

ResourceBundle::getErrorMessage

resourcebundle_get_error_message

(PHP 5 >= 5.3.2, PHP 7, PHP 8, PECL intl >= 2.0.0)

ResourceBundle::getErrorMessage -- resourcebundle_get_error_message — 번들의 마지막 오류 메시지 가져오기


설명

객체 지향 스타일

public ResourceBundle::getErrorMessage(): string

절차 스타일:

resourcebundle_get_error_message(ResourceBundle $bundle): string

번들 객체가 수행한 마지막 기능에서 오류 메시지를 가져옵니다.


매개변수

bundle
ResourceBundle 개체.

반환 값

마지막 번들 개체의 호출에서 오류 메시지를 반환합니다.


Examples

예제 #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 OO 예제

                  
<?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));
}
?>
                  
                

기타