array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'pt_BR', ), 'this' => array ( 0 => 'intlcalendar.geterrormessage.php', 1 => 'IntlCalendar::getErrorMessage', ), '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' => 'pt_BR', 'path' => 'reference/intl/intlcalendar/geterrormessage.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 5 >= 5.5.0, PHP 7, PHP 8, PECL >= 3.0.0a1)
IntlCalendar::getErrorMessage -- intlcal_get_error_message — Obtém a última mensagem de erro no objeto
Estilo orientado a objetos (method):
Estilo procedural:
Retorna a mensagem de erro (se houver) associada com o erro reportado por IntlCalendar::getErrorCode() ou intlcal_get_error_code(). Se não houver mensagem de erro associada, apenas a represetnação em string do nome da constante de erro será retornada. Caso contrário, o texto também incluirá uma mensagem definida no lado da ligação com o PHP.
calendar
O objeto calendário, na interface de estilo procedural.
A mensagem de erro associada com o último erro ocorrido em uma chamada de função
neste objeto, ou uma string indicando a não existência de erro.
Retorna false
em caso de falha.
Exemplo #1 IntlCalendar::getErrorMessage()
<?php
$cal = IntlCalendar::createInstance('UTC', 'en_US');
var_dump($cal->getErrorMessage());
$cal->getWeekendTransition(IntlCalendar::DOW_WEDNESDAY);
var_dump($cal->getErrorMessage());
O exemplo acima produzirá:
string(12) "U_ZERO_ERROR" string(82) "intlcal_get_weekend_transition: Error calling ICU method: U_ILLEGAL_ARGUMENT_ERROR"