Seems ok to me.
didou
Jakub Vrana wrote:
rampant at gmail dot com wrote:
The documentation for "try" and "catch" is in the "Classes and Objects" chapter of the manual. Throw, Try and Catch control the flow of execution much like "if" does. They make use of the Exception class, just as "if" works on booleans - and just as if is not put into the "Types" chapter, we shouldn't expect to find try and catch in the "Classes and Objects" chapter.
It's quite a big change so I am sending a patch for it first. I think the best location for exceptions is directly under the Language Reference (not under the Control Structures as proposed).
Alongside the patch, there will be move of language/oop5/exceptions.xml to language/exceptions.xml.
If there are no objections, I will apply the patch today. I can move this file also in other language versions (fr, ja, pt_BR).
After manual rebuild, we should also move user notes.
Jakub Vrana
------------------------------------------------------------------------
Index: manual.xml.in
===================================================================
RCS file: /repository/phpdoc/manual.xml.in,v
retrieving revision 1.200
diff -u -r1.200 manual.xml.in
--- manual.xml.in 25 Dec 2004 03:14:39 -0000 1.200
+++ manual.xml.in 29 Dec 2004 08:37:09 -0000
@@ -78,6 +78,7 @@
&language.functions;
&language.oop;
&language.oop5;
+ &language.exceptions;
&language.references;
</part>
Index: en/language/oop5/basic.xml
===================================================================
RCS file: /repository/phpdoc/en/language/oop5/basic.xml,v
retrieving revision 1.8
diff -u -r1.8 basic.xml
--- language/oop5/basic.xml 28 Dec 2004 14:39:19 -0000 1.8
+++ language/oop5/basic.xml 29 Dec 2004 08:23:10 -0000
@@ -44,7 +44,7 @@
assigned to a variable. An object will always be assigned when
creating a new object unless the object has a
<link linkend="language.oop5.decon">constructor</link> defined that throws an
- <link linkend="language.oop5.exceptions">exception</link> on error.
+ <link linkend="language.exceptions">exception</link> on error.
</para>
<example>
<title>Creating an instance</title>
Index: en/language/oop5/exceptions.xml
===================================================================
RCS file: /repository/phpdoc/en/language/oop5/exceptions.xml,v
retrieving revision 1.10
diff -u -r1.10 exceptions.xml
--- language/oop5/exceptions.xml 24 Nov 2004 18:39:33 -0000 1.10
+++ language/oop5/exceptions.xml 29 Dec 2004 08:24:40 -0000
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.10 $ -->
- <sect1 id="language.oop5.exceptions">
+ <chapter id="language.exceptions">
<title>Exceptions</title>
<para>
@@ -40,7 +40,7 @@
</programlisting>
</example>
- <sect2 id="language.oop5.exceptions.extending">
+ <sect1 id="language.exceptions.extending">
<title>Extending Exceptions</title>
<para>
A User defined Exception class can be defined by extending the built-in
@@ -202,9 +202,9 @@
]]>
</programlisting>
</example>
- </sect2>
+ </sect1>
- </sect1>
+ </chapter>
<!-- Keep this comment at the end of the file
Local variables:
Index: en/language/oop5.xml
===================================================================
RCS file: /repository/phpdoc/en/language/oop5.xml,v
retrieving revision 1.9
diff -u -r1.9 oop5.xml
--- language/oop5.xml 29 Oct 2004 11:28:21 -0000 1.9
+++ language/oop5.xml 29 Dec 2004 08:21:59 -0000
@@ -25,7 +25,6 @@
&language.oop5.patterns;
&language.oop5.magic;
&language.oop5.final;
- &language.oop5.exceptions;
&language.oop5.cloning;
&language.oop5.object-comparison;
&language.oop5.reflection;
Index: en/reference/dom/reference.xml
===================================================================
RCS file: /repository/phpdoc/en/reference/dom/reference.xml,v
retrieving revision 1.11
diff -u -r1.11 reference.xml
--- reference/dom/reference.xml 27 Dec 2004 16:53:35 -0000 1.11
+++ reference/dom/reference.xml 29 Dec 2004 09:19:27 -0000
@@ -683,7 +683,7 @@
when an operation is impossible to perform for logical reasons.
</para>
<para>
- See also <xref linkend="language.oop5.exceptions"/>.
+ See also <xref linkend="language.exceptions"/>.
</para>
<section id='dom.class.domexception.properties'>
&reftitle.properties;
Index: en/appendices/reserved.xml
===================================================================
RCS file: /repository/phpdoc/en/appendices/reserved.xml,v
retrieving revision 1.52
diff -u -r1.52 reserved.xml
--- appendices/reserved.xml 4 Nov 2004 08:36:01 -0000 1.52
+++ appendices/reserved.xml 29 Dec 2004 09:19:32 -0000
@@ -240,15 +240,15 @@
<link linkend="language.oop5.cloning">clone</link> (PHP 5)
</entry>
<entry>
- <link linkend="language.oop5.exceptions">try</link> (PHP 5)
+ <link linkend="language.exceptions">try</link> (PHP 5)
</entry>
<entry>
- <link linkend="language.oop5.exceptions">catch</link> (PHP 5)
+ <link linkend="language.exceptions">catch</link> (PHP 5)
</entry>
</row>
<row>
<entry>
- <link linkend="language.oop5.exceptions">throw</link> (PHP 5)
+ <link linkend="language.exceptions">throw</link> (PHP 5)
</entry>
<entry>
<link linkend="migration.old-function">cfunction</link> (PHP 4 only)
Index: en/reference/errorfunc/functions/set-exception-handler.xml
===================================================================
RCS file: /repository/phpdoc/en/reference/errorfunc/functions/set-exception-handler.xml,v
retrieving revision 1.4
diff -u -r1.4 set-exception-handler.xml
--- reference/errorfunc/functions/set-exception-handler.xml 8 Nov 2004 12:10:20 -0000 1.4
+++ reference/errorfunc/functions/set-exception-handler.xml 29 Dec 2004 09:19:20 -0000
@@ -88,7 +88,7 @@
<function>restore_exception_handler</function>
<function>restore_error_handler</function>
<function>error_reporting</function>&listendand;
- <link linkend="language.oop5.exceptions">PHP 5 Exceptions</link>
+ <link linkend="language.exceptions">PHP 5 Exceptions</link>
</para>
</refsect1>
</refentry>
