<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="intlcalendar.geterrormessage" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
 <refnamediv>
  <refname>IntlCalendar::getErrorMessage</refname>
  <refname>intlcal_get_error_message</refname>
  <refpurpose>Get last error message on the object</refpurpose>
 </refnamediv>

 <refsect1 role="description">
  &reftitle.description;
  <para>&style.oop; (method):</para>
   <methodsynopsis role="IntlCalendar">
   <modifier>public</modifier> <type class="union"><type>string</type><type>false</type></type><methodname>IntlCalendar::getErrorMessage</methodname>
   <void/>
  </methodsynopsis>
  <para>&style.procedural;:</para>
  <methodsynopsis>
   <type class="union"><type>string</type><type>false</type></type><methodname>intlcal_get_error_message</methodname>
   <methodparam><type>IntlCalendar</type><parameter>calendar</parameter></methodparam>
  </methodsynopsis>
  <para>
   Returns the error message (if any) associated with the error reported by
   <function>IntlCalendar::getErrorCode</function> or
   <function>intlcal_get_error_code</function>. If there is no associated
   error message, only the string representation of the name of the error
   constant will be returned.  Otherwise, the message also includes a message
   set on the side of the PHP binding.
  </para>
 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <variablelist>
   <varlistentry>
    <term><parameter>calendar</parameter></term>
    <listitem>
     <para>
      The calendar object, on the procedural style interface.
     </para>
    </listitem>
   </varlistentry>
  </variablelist>
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   The error message associated with last error that occurred in a function call
   on this object, or a string indicating the non-existence of an error.
   Returns &false; on failure.
  </para>
 </refsect1>

 <refsect1 role="examples">
  &reftitle.examples;
  <para>
   <example>
   <title><function>IntlCalendar::getErrorMessage</function></title>
    <programlisting role="php">
<![CDATA[
<?php
$cal = IntlCalendar::createInstance('UTC', 'en_US');
var_dump($cal->getErrorMessage());

$cal->getWeekendTransition(IntlCalendar::DOW_WEDNESDAY);
var_dump($cal->getErrorMessage());

]]>
    </programlisting>
    &example.outputs;
    <screen>
<![CDATA[
string(12) "U_ZERO_ERROR"
string(82) "intlcal_get_weekend_transition: Error calling ICU method: U_ILLEGAL_ARGUMENT_ERROR"
]]>
    </screen>
   </example>
  </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
-->
