com php-langspec: add properties to Error: spec/14-classes.md spec/17-exception-handling.md

[email protected] (Stanislav Malyshev) Fri, 01 Jan 2016 22:39:30 +0000
Newsgroups php.standards.cvs
Message-ID <[email protected]>
Commit:    15133d08c1cf7c5ecdd3ee5b4d02c93407702f00
Author:    Stanislav Malyshev <[email protected]>         Fri, 1 Jan 2016 14:36:10 -0800
Parents:   0c77bc82fa41384f99110a18f4b6be1c9aa8e2df
Branches:  master

Link:       http://git.php.net/?p=php-langspec.git;a=commitdiff;h=15133d08c1cf7c5ecdd3ee5b4d02c93407702f00

Log:
add properties to Error

Changed paths:
  M  spec/14-classes.md
  M  spec/17-exception-handling.md


Diff:
diff --git a/spec/14-classes.md b/spec/14-classes.md
index 788ffe6..e5ccf40 100644
--- a/spec/14-classes.md
+++ b/spec/14-classes.md
@@ -52,7 +52,7 @@ When an instance is allocated, `new` returns a handle that points to that
 object. As such, assignment of a handle does not copy the object itself.
 (See [cloning objects](04-basic-concepts.md#cloning-objects) for a discussion of shallow and deep copying).
 
-While PHP supports *anonymous class types*, such a type cannot be declared using [*class-declaration*](14-classes.md#class-declarations). Instead, it must be specified at the time of instantiation; that is, as part of an [*object-creation-expression*](10-expressions.md#the-new-operator).
+While PHP supports *anonymous class types*, such a type cannot be declared using [*class-declaration*](#class-declarations). Instead, it must be specified at the time of instantiation; that is, as part of an [*object-creation-expression*](10-expressions.md#the-new-operator).
 
 ##Class Declarations
 
@@ -1803,7 +1803,7 @@ $s = serialize($cp);
 $v = unserialize($s);
 ```
 
-Function `unserialize` takes an optional second argument, which specifies an array of trusted class names as strings. Objects found in the data stream whose type name is not in this trusted name list are converted to objects of type [`__PHP_Incomplete_Class`](14-classes.md#class-__PHP_Incomplete_Class).
+Function `unserialize` takes an optional second argument, which specifies an array of trusted class names as strings. Objects found in the data stream whose type name is not in this trusted name list are converted to objects of type [`__PHP_Incomplete_Class`](#class-__PHP_Incomplete_Class).
 
 Any attempt to serialize an object having an anonymous class type results in an instance of type `Exception` being thrown.
 
@@ -2015,6 +2015,15 @@ This class is the base class for all internal PHP error exceptions. It is define
 ```PHP
 class Error implements Throwable
 {
+  protected $message = '';
+  protected $code = 0;
+  protected $file;
+  protected $line;
+
+  public function __construct($message = "", $code = 0,
+               Throwable $previous = NULL);
+
+  final private function __clone();
 }
 ```
 
@@ -2038,7 +2047,7 @@ class ArithmeticError extends Error
 
 **Defined elsewhere**
 
-* [`Error`](14-classes.md#class-error)
+* [`Error`](#class-error)
 
 ####Class `AssertionError`
 
@@ -2052,7 +2061,7 @@ class AssertionError extends Error
 
 **Defined elsewhere**
 
-* [`Error`](14-classes.md#class-error)
+* [`Error`](#class-error)
 
 ####Class `DivisionByZeroError`
 
@@ -2066,7 +2075,7 @@ class DivisionByZeroError extends Error
 
 **Defined elsewhere**
 
-* [`Error`](14-classes.md#class-error)
+* [`Error`](#class-error)
 
 ####Class `ParseError`
 
@@ -2080,7 +2089,7 @@ class ParseError extends Error
 
 **Defined elsewhere**
 
-* [`Error`](14-classes.md#class-error)
+* [`Error`](#class-error)
 
 ####Class `TypeError`
 
@@ -2100,4 +2109,6 @@ class TypeError extends Error
 
 **Defined elsewhere**
 
-* [`Error`](14-classes.md#class-error)
+* [`Error`](#class-error)
+
+See also class [`Exception`](17-exception-handling.md#class-exception).
diff --git a/spec/17-exception-handling.md b/spec/17-exception-handling.md
index 3efed5c..ed28f0d 100644
--- a/spec/17-exception-handling.md
+++ b/spec/17-exception-handling.md
@@ -48,7 +48,7 @@ Class `Exception` is the base class of all exception types. This class is
 defined, as follows:
 
 ```PHP
-Class Exception implements Throwable
+class Exception implements Throwable
 {
   protected $message = 'Unknown exception';
   protected $code = 0;
@@ -56,7 +56,7 @@ Class Exception implements Throwable
   protected $line;
 
   public function __construct($message = "", $code = 0,
-               Exception $previous = NULL);
+               Throwable $previous = NULL);
 
   final private function __clone();
 }