From 369f55a71fee63d6d77aea8b9d935d322139a64e Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Wed, 2 Jul 2014 13:17:13 +0400 Subject: [PATCH] [NEW] Introduced CreateTemporaryFileException. --- .../Exception/CreateTemporaryFileException.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/PhpWord/Exception/CreateTemporaryFileException.php b/src/PhpWord/Exception/CreateTemporaryFileException.php index 9cddb7ac..b68569c9 100644 --- a/src/PhpWord/Exception/CreateTemporaryFileException.php +++ b/src/PhpWord/Exception/CreateTemporaryFileException.php @@ -22,10 +22,16 @@ namespace PhpOffice\PhpWord\Exception; */ final class CreateTemporaryFileException extends Exception { - protected $message = 'Could not create a temporary file with unique name in the specified directory.'; - - final public function __construct() + /** + * @param integer $code The user defined exception code. + * @param \Exception $previous The previous exception used for the exception chaining. + */ + final public function __construct($code = 0, \Exception $previous = null) { - parent::__construct($this->message); + parent::__construct( + 'Could not create a temporary file with unique name in the specified directory.', + $code, + $previous + ); } }