reference/intl/messageformatter/get-error-code.xml
1976eae0d815797af97a1e16c5cd90ffc2868395
...
...
@@ -1,6 +1,6 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="messageformatter.geterrorcode">
3
+
<refentry xml:id="messageformatter.geterrorcode" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
4
4
<refnamediv>
5
5
<refname>MessageFormatter::getErrorCode</refname>
6
6
<refname>msgfmt_get_error_code</refname>
...
...
@@ -12,19 +12,16 @@
12
12
<para>
13
13
&style.oop;
14
14
</para>
15
-
<methodsynopsis>
16
-
<modifier>public</modifier>
17
-
<type>int</type>
18
-
<methodname>MessageFormatter::getErrorCode</methodname>
19
-
<void />
15
+
<methodsynopsis role="MessageFormatter">
16
+
<modifier>public</modifier> <type>int</type><methodname>MessageFormatter::getErrorCode</methodname>
17
+
<void/>
20
18
</methodsynopsis>
21
19
<para>
22
20
&style.procedural;
23
21
</para>
24
22
<methodsynopsis>
25
-
<type>int</type>
26
-
<methodname>msgfmt_get_error_code</methodname>
27
-
<methodparam><type>MessageFormatter</type><parameter>fmt</parameter></methodparam>
23
+
<type>int</type><methodname>msgfmt_get_error_code</methodname>
24
+
<methodparam><type>MessageFormatter</type><parameter>formatter</parameter></methodparam>
28
25
</methodsynopsis>
29
26
<para>
30
27
Get the error code from last operation.
...
...
@@ -36,7 +33,7 @@
36
33
<para>
37
34
<variablelist>
38
35
<varlistentry>
39
-
<term><parameter>fmt</parameter></term>
36
+
<term><parameter>formatter</parameter></term>
40
37
<listitem>
41
38
<para>
42
39
The message formatter
...
...
@@ -55,44 +52,6 @@
55
52
</para>
56
53
</refsect1>
57
54

58
-
<refsect1 role="examples">
59
-
&reftitle.examples;
60
-
<example>
61
-
<title><function>msgfmt_get_error_code</function> example</title>
62
-
<programlisting role="php">
63
-
<![CDATA[
64
-
<?php
65
-
$fmt = msgfmt_create("en_US", "{0, number} monkeys on {1, number} trees");
66
-
$str = msgfmt_format($fmt, array());
67
-
if(!$str) {
68
-
echo "ERROR: ".msgfmt_get_error_message($fmt) . " (" . msgfmt_get_error_code($fmt) . ")\n";
69
-
}
70
-
?>
71
-
]]>
72
-
</programlisting>
73
-
</example>
74
-
<example>
75
-
<title>OO example</title>
76
-
<programlisting role="php">
77
-
<![CDATA[
78
-
<?php
79
-
$fmt = new MessageFormatter("en_US", "{0, number} monkeys on {1, number} trees");
80
-
$str = $fmt->format(array());
81
-
if(!$str) {
82
-
echo "ERROR: ".$fmt->getErrorMessage() . " (" . $fmt->getErrorCode() . ")\n";
83
-
}
84
-
?>
85
-
]]>
86
-
</programlisting>
87
-
</example>
88
-
&example.outputs;
89
-
<screen>
90
-
<![CDATA[
91
-
ERROR: msgfmt_format: not enough parameters: U_ILLEGAL_ARGUMENT_ERROR (1)
92
-
]]>
93
-
</screen>
94
-
</refsect1>
95
-

96
55
<refsect1 role="seealso">
97
56
&reftitle.seealso;
98
57
<para>
99
58