Query: msgfmt_get_error_message
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
MSGFMT_GET_ERROR_MESSAGE(3) 1 MSGFMT_GET_ERROR_MESSAGE(3) MessageFormatter::getErrorMessage - Get the error text from the last operation Object oriented styleSYNOPSISpublic string MessageFormatter::getErrorMessage (void )DESCRIPTIONProcedural style string msgfmt_get_error_message (MessageFormatter $fmt) Get the error text from the last operation.PARAMETERSo $fmt - The message formatterRETURN VALUESDescription of the last error.EXAMPLESExample #1 msgfmt_get_error_message(3) example <?php $fmt = msgfmt_create("en_US", "{0, number} monkeys on {1, number} trees"); $str = msgfmt_format($fmt, array()); if(!$str) { echo "ERROR: ".msgfmt_get_error_message($fmt) . " (" . msgfmt_get_error_code($fmt) . ") "; } ?> Example #2 OO example <?php $fmt = new MessageFormatter("en_US", "{0, number} monkeys on {1, number} trees"); $str = $fmt->format(array()); if(!$str) { echo "ERROR: ".$fmt->getErrorMessage() . " (" . $fmt->getErrorCode() . ") "; } ?> The above example will output: ERROR: msgfmt_format: not enough parameters: U_ILLEGAL_ARGUMENT_ERROR (1)SEE ALSOmsgfmt_get_error_code(3), intl_get_error_code(3), intl_is_failure(3). PHP Documentation Group MSGFMT_GET_ERROR_MESSAGE(3)
Related Man Pages |
---|
msgfmt_get_error_message(3) - php |
msgfmt_format(3) - php |
msgfmt_parse(3) - php |
msgfmt_set_pattern(3) - php |
numfmt_get_error_code(3) - php |
Similar Topics in the Unix Linux Community |
---|
Script help needed |
fmt command |
ICFB ERROR |
Error line number |
Receiving: 4B436A3D 0313233216 T H fscsi0 LINK ERROR |