<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.intlcalendar.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'intlcalendar.geterrormessage.php',
    1 => 'IntlCalendar::getErrorMessage',
    2 => 'Get last error message on the object',
  ),
  'up' => 
  array (
    0 => 'class.intlcalendar.php',
    1 => 'IntlCalendar',
  ),
  'prev' => 
  array (
    0 => 'intlcalendar.geterrorcode.php',
    1 => 'IntlCalendar::getErrorCode',
  ),
  'next' => 
  array (
    0 => 'intlcalendar.getfirstdayofweek.php',
    1 => 'IntlCalendar::getFirstDayOfWeek',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/intl/intlcalendar/geterrormessage.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="intlcalendar.geterrormessage" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">IntlCalendar::getErrorMessage</h1>
  <h1 class="refname">intlcal_get_error_message</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.5.0, PHP 7, PHP 8, PECL &gt;= 3.0.0a1)</p><p class="refpurpose"><span class="refname">IntlCalendar::getErrorMessage</span> -- <span class="refname">intlcal_get_error_message</span> &mdash; <span class="dc-title">Get last error message on the object</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-intlcalendar.geterrormessage-description">
  <h3 class="title">Description</h3>
  <p class="para">Object-oriented style (method):</p>
   <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>IntlCalendar::getErrorMessage</strong></span>(): <span class="type"><span class="type"><a href="language.types.string.php" class="type string">string</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">Procedural style:</p>
  <div class="methodsynopsis dc-description"><span class="methodname"><strong>intlcal_get_error_message</strong></span>(<span class="methodparam"><span class="type"><a href="class.intlcalendar.php" class="type IntlCalendar">IntlCalendar</a></span> <code class="parameter">$calendar</code></span>): <span class="type"><span class="type"><a href="language.types.string.php" class="type string">string</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   Returns the error message (if any) associated with the error reported by
   <span class="function"><a href="intlcalendar.geterrorcode.php" class="function">IntlCalendar::getErrorCode()</a></span> or
   <span class="function"><a href="intlcalendar.geterrorcode.php" class="function">intlcal_get_error_code()</a></span>. 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.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-intlcalendar.geterrormessage-parameters">
  <h3 class="title">Parameters</h3>
  <dl>
   
    <dt><code class="parameter">calendar</code></dt>
    <dd>
     <p class="para">
      The calendar object, on the procedural style interface.
     </p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-intlcalendar.geterrormessage-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="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 <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> on failure.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-intlcalendar.geterrormessage-examples">
  <h3 class="title">Examples</h3>
  <p class="para">
   <div class="example" id="example-1">
   <p><strong>Example #1 <span class="function"><strong>IntlCalendar::getErrorMessage()</strong></span></strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$cal </span><span style="color: #007700">= </span><span style="color: #0000BB">IntlCalendar</span><span style="color: #007700">::</span><span style="color: #0000BB">createInstance</span><span style="color: #007700">(</span><span style="color: #DD0000">'UTC'</span><span style="color: #007700">, </span><span style="color: #DD0000">'en_US'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$cal</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getErrorMessage</span><span style="color: #007700">());<br /><br /></span><span style="color: #0000BB">$cal</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getWeekendTransition</span><span style="color: #007700">(</span><span style="color: #0000BB">IntlCalendar</span><span style="color: #007700">::</span><span style="color: #0000BB">DOW_WEDNESDAY</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$cal</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getErrorMessage</span><span style="color: #007700">());</span></span></code></div>
    </div>

    <div class="example-contents"><p>The above example will output:</p></div>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">string(12) &quot;U_ZERO_ERROR&quot;
string(82) &quot;intlcal_get_weekend_transition: Error calling ICU method: U_ILLEGAL_ARGUMENT_ERROR&quot;</pre>
</div>
    </div>
   </div>
  </p>
 </div>


</div><?php manual_footer($setup); ?>