<?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> <refentry xml:id="resourcebundle.geterrormessage" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <refnamediv> <refname>ResourceBundle::getErrorMessage</refname> <refname>resourcebundle_get_error_message</refname> <refpurpose>Get bundle's last error message.</refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; <para> Object oriented style </para> <methodsynopsis> <type>string</type> <methodname>ResourceBundle::getErrorMessage</methodname> <void /> </methodsynopsis> <para> Procedural style </para> <methodsynopsis> <type>string</type> <methodname>resourcebundle_get_error_message</methodname> <methodparam><type>ResourceBundle</type><parameter>r</parameter></methodparam> </methodsynopsis> <para> Get error message from the last function performed by the bundle object. </para> </refsect1> <refsect1 role="parameters"> &reftitle.parameters; <para> <variablelist> <varlistentry> <term><parameter>r</parameter></term> <listitem> <para> <classname>ResourceBundle</classname> object. </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> Returns error message from last bundle object's call. </para> </refsect1> <refsect1 role="examples"> &reftitle.examples; <example> <title><function>resourcebundle_get_error_message</function> example</title> <programlisting role="php"> <![CDATA[ <?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)); } ?> ]]> </programlisting> </example> <example> <title>OO example</title> <programlisting role="php"> <![CDATA[ <?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)); } ?> ]]> </programlisting> </example> </refsect1> <refsect1 role="seealso"> &reftitle.seealso; <para> <simplelist> <member><function>resourcebundle_get_error_code</function></member> <member><function>intl_get_error_code</function></member> <member><function>intl_is_failure</function></member> </simplelist> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"~/.phpdoc/manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->