com php-langspec: Support multiple catch: spec/11-statements.md spec/19-grammar.md

[email protected] (Nikita Popov) Mon, 10 Sep 2018 12:02:25 +0000
Newsgroups php.standards.cvs
Message-ID <[email protected]>
Commit:    15b92edd483df7f476e93fc7213cbba17bff10c6=0AAuthor:    Nikita Pop=
ov <[email protected]>         Mon, 10 Sep 2018 14:01:41 +0200=0AParents=
:   b5ca441040e2c6f8c38d3b7373f7c720af4b8f8c=0ABranches:  master=0A=0ALink:=
       http://git.php.net/?p=3Dphp-langspec.git;a=3Dcommitdiff;h=3D15b92edd=
483df7f476e93fc7213cbba17bff10c6=0A=0ALog:=0ASupport multiple catch=0A=0AFi=
xes #216.=0A=0ABugs:=0Ahttps://bugs.php.net/216=0A=0AChanged paths:=0A  M  =
spec/11-statements.md=0A  M  spec/19-grammar.md=0A=0A=0ADiff:=0Adiff --git =
a/spec/11-statements.md b/spec/11-statements.md=0Aindex 062a64e..6534929 10=
0644=0A--- a/spec/11-statements.md=0A+++ b/spec/11-statements.md=0A@@ -1117=
,7 +1117,11 @@ catch-clauses:=0A   catch-clauses catch-clause=0A =0A catch-=
clause:=0A-  'catch' '(' qualified-name variable-name ')' compound-statemen=
t=0A+  'catch' '(' catch-name-list variable-name ')' compound-statement=0A+=
=0A+catch-name-list:=0A+  qualified-name=0A+  catch-name-list '|' qualified=
-name=0A =0A finally-clause:=0A   'finally' compound-statement=0A@@ -1134,7=
 +1138,11 @@ finally-clause:=0A    <i><a href=3D"#grammar-catch-clauses">ca=
tch-clauses</a></i>   <i><a href=3D"#grammar-catch-clause">catch-clause</a>=
</i>=0A =0A <i id=3D"grammar-catch-clause">catch-clause:</i>=0A-   catch   =
(   <i><a href=3D"09-lexical-structure.md#grammar-qualified-name">qualified=
-name</a></i>   <i><a href=3D"09-lexical-structure.md#grammar-variable-name=
">variable-name</a></i>   )   <i><a href=3D"#grammar-compound-statement">co=
mpound-statement</a></i>=0A+   catch   (   <i><a href=3D"#grammar-catch-nam=
e-list">catch-name-list</a></i>   <i><a href=3D"09-lexical-structure.md#gra=
mmar-variable-name">variable-name</a></i>   )   <i><a href=3D"#grammar-comp=
ound-statement">compound-statement</a></i>=0A+=0A+<i id=3D"grammar-catch-na=
me-list">catch-name-list:</i>=0A+   <i><a href=3D"09-lexical-structure.md#g=
rammar-qualified-name">qualified-name</a></i>=0A+   <i><a href=3D"#grammar-=
catch-name-list">catch-name-list</a></i>   |   <i><a href=3D"09-lexical-str=
ucture.md#grammar-qualified-name">qualified-name</a></i>=0A =0A <i id=3D"gr=
ammar-finally-clause">finally-clause:</i>=0A    finally   <i><a href=3D"#gr=
ammar-compound-statement">compound-statement</a></i>=0A@@ -1142,9 +1150,8 @=
@ finally-clause:=0A =0A **Constraints**=0A =0A-In a *catch-clause*, *param=
eter-declaration-list* must contain only one=0A-parameter, and its type mus=
t be [`Exception`](17-exception-handling.md#class-exception) or a type deri=
ved from=0A-that class, and that parameter must not be passed byRef.=0A+Eac=
h *qualified-name* inside a *catch-name-list* must name a type derivated fr=
om=0A+[`Exception`](17-exception-handling.md#class-exception).=0A =0A **Sem=
antics**=0A =0A@@ -1165,9 +1172,10 @@ try-block that encloses the call to t=
he current function. This process=0A continues until a catch-block is found=
 that can handle the current=0A exception.=0A =0A-The matching is done by c=
onsidering the class specified by *qualified-name*=0A-and comparing it to t=
he type of the exception. If the exception is an=0A-[instance of](10-expres=
sions.md#instanceof-operator) this class then the clause matches.=0A+The ma=
tching is done by considering the classes specified by *qualified-name*=0A+=
in *catch-name-list* and comparing it to the type of the exception. If the=
=0A+exception is an [instance of](10-expressions.md#instanceof-operator) on=
e of=0A+the specified classes then the clause matches.=0A =0A If a matching=
 catch-block is located, the Engine prepares to transfer=0A control to the =
first statement of that catch-block. However, before=0Adiff --git a/spec/19=
-grammar.md b/spec/19-grammar.md=0Aindex 7deab0b..e647342 100644=0A--- a/sp=
ec/19-grammar.md=0A+++ b/spec/19-grammar.md=0A@@ -870,7 +870,11 @@ The gram=
mar notation is described in [Grammars section](09-lexical-structure.md#=0A=
    <i><a href=3D"#grammar-catch-clauses">catch-clauses</a></i>   <i><a hre=
f=3D"#grammar-catch-clause">catch-clause</a></i>=0A =0A <i id=3D"grammar-ca=
tch-clause">catch-clause:</i>=0A-   catch   (   <i><a href=3D"#grammar-qual=
ified-name">qualified-name</a></i>   <i><a href=3D"#grammar-variable-name">=
variable-name</a></i>   )   <i><a href=3D"#grammar-compound-statement">comp=
ound-statement</a></i>=0A+   catch   (   <i><a href=3D"#grammar-catch-name-=
list">catch-name-list</a></i>   <i><a href=3D"#grammar-variable-name">varia=
ble-name</a></i>   )   <i><a href=3D"#grammar-compound-statement">compound-=
statement</a></i>=0A+=0A+<i id=3D"grammar-catch-name-list">catch-name-list:=
</i>=0A+   <i><a href=3D"#grammar-qualified-name">qualified-name</a></i>=0A=
+   <i><a href=3D"#grammar-catch-name-list">catch-name-list</a></i>   |   <=
i><a href=3D"#grammar-qualified-name">qualified-name</a></i>=0A =0A <i id=
=3D"grammar-finally-clause">finally-clause:</i>=0A    finally   <i><a href=
=3D"#grammar-compound-statement">compound-statement</a></i>=0A