Skip to content

Commit fda5eb1

Browse files
committed
Fixed #554
(cherry picked from commit eda7962)
1 parent 6a0e8c0 commit fda5eb1

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/phpFastCache/Exceptions/phpFastCacheIOException.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,21 @@
1717
/**
1818
* Class phpFastCacheIOException
1919
* @package phpFastCache\Exceptions
20+
* @since v6
2021
*/
2122
class phpFastCacheIOException extends phpFastCacheCoreException
2223
{
23-
24+
/**
25+
* @inheritdoc
26+
*/
27+
public function __construct($message = "", $code = 0, $previous = null)
28+
{
29+
$lastError = error_get_last();
30+
if($lastError){
31+
$message .= "\n";
32+
$message .= "Additional information provided by error_get_last():\n";
33+
$message .= "{$lastError['message']} in {$lastError['file']} line {$lastError['line']}";
34+
}
35+
parent::__construct($message, $code, $previous);
36+
}
2437
}

0 commit comments

Comments
 (0)