reference/errorfunc/functions/trigger-error.xml
d715365c098db000eaf7dcd987ee6093f6e83091
...
...
@@ -9,7 +9,7 @@
9
9
<refsect1 role="description">
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
-
<type>bool</type><methodname>trigger_error</methodname>
12
+
<type>true</type><methodname>trigger_error</methodname>
13
13
<methodparam><type>string</type><parameter>message</parameter></methodparam>
14
14
<methodparam choice="opt"><type>int</type><parameter>error_level</parameter><initializer><constant>E_USER_NOTICE</constant></initializer></methodparam>
15
15
</methodsynopsis>
...
...
@@ -55,11 +55,43 @@
55
55
<refsect1 role="returnvalues">
56
56
&reftitle.returnvalues;
57
57
<para>
58
-
This function returns &false; if wrong <parameter>error_level</parameter> is
59
-
specified, &true; otherwise.
58
+
&return.true.always;
60
59
</para>
61
60
</refsect1>
62
61

62
+
<refsect1 role="errors">
63
+
&reftitle.errors;
64
+
<para>
65
+
This function throws a <classname>ValueError</classname> if
66
+
<parameter>error_level</parameter> is not one of
67
+
<constant>E_USER_ERROR</constant>, <constant>E_USER_WARNING</constant>,
68
+
<constant>E_USER_NOTICE</constant>, <constant>E_USER_DEPRECATED</constant>.
69
+
</para>
70
+
</refsect1>
71
+

72
+
<refsect1 role="changelog">
73
+
&reftitle.changelog;
74
+
<informaltable>
75
+
<tgroup cols="2">
76
+
<thead>
77
+
<row>
78
+
<entry>&Version;</entry>
79
+
<entry>&Description;</entry>
80
+
</row>
81
+
</thead>
82
+
<tbody>
83
+
<row>
84
+
<entry>8.0.0</entry>
85
+
<entry>
86
+
The function now throws a <classname>ValueError</classname> if an invalid
87
+
<parameter>error_level</parameter> is specified. Previously, it returned &false;.
88
+
</entry>
89
+
</row>
90
+
</tbody>
91
+
</tgroup>
92
+
</informaltable>
93
+
</refsect1>
94
+

63
95
<refsect1 role="examples">
64
96
&reftitle.examples;
65
97
<para>
66
98