Skip to content

Commit 369f55a

Browse files
author
Roman Syroeshko
committed
[NEW] Introduced CreateTemporaryFileException.
1 parent dbc9737 commit 369f55a

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/PhpWord/Exception/CreateTemporaryFileException.php

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,16 @@
2222
*/
2323
final class CreateTemporaryFileException extends Exception
2424
{
25-
protected $message = 'Could not create a temporary file with unique name in the specified directory.';
26-
27-
final public function __construct()
25+
/**
26+
* @param integer $code The user defined exception code.
27+
* @param \Exception $previous The previous exception used for the exception chaining.
28+
*/
29+
final public function __construct($code = 0, \Exception $previous = null)
2830
{
29-
parent::__construct($this->message);
31+
parent::__construct(
32+
'Could not create a temporary file with unique name in the specified directory.',
33+
$code,
34+
$previous
35+
);
3036
}
3137
}

0 commit comments

Comments
 (0)