With PHP7 Throwable is the new base interface for all Exception and Error - we should be capable to log Throwable as well

This commit is contained in:
Thomas Müller 2016-04-20 17:49:58 +02:00
parent afad27fafd
commit 069af51dd0
2 changed files with 4 additions and 4 deletions

View File

@ -270,12 +270,12 @@ class Log implements ILogger {
/**
* Logs an exception very detailed
*
* @param \Exception $exception
* @param \Exception | \Throwable $exception
* @param array $context
* @return void
* @since 8.2.0
*/
public function logException(\Exception $exception, array $context = array()) {
public function logException($exception, array $context = array()) {
$exception = array(
'Exception' => get_class($exception),
'Message' => $exception->getMessage(),

View File

@ -135,10 +135,10 @@ interface ILogger {
* ]);
* </code>
*
* @param \Exception $exception
* @param \Exception | \Throwable $exception
* @param array $context
* @return void
* @since 8.2.0
*/
public function logException(\Exception $exception, array $context = array());
public function logException($exception, array $context = array());
}