IntlCalendar::getErrorMessage

intlcal_get_error_message

Get last error message on the object

&reftitle.description;

&style.oop; (method):

public ``string``false```IntlCalendar::getErrorMessage`

&style.procedural;:

``string``false```intlcal_get_error_message` `IntlCalendar` `calendar`

Returns the error message (if any) associated with the error reported by `IntlCalendar::getErrorCode` or `intlcal_get_error_code`. 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.

&reftitle.parameters;

`calendar`

- The calendar object, on the procedural style interface.

&reftitle.returnvalues;

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.

&reftitle.examples;

### `IntlCalendar::getErrorMessage`

    <?php
    $cal = IntlCalendar::createInstance('UTC', 'en_US');
    var_dump($cal->getErrorMessage());

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

&example.outputs;

    string(12) "U_ZERO_ERROR"
    string(82) "intlcal_get_weekend_transition: Error calling ICU method: U_ILLEGAL_ARGUMENT_ERROR"