Skip to content

Commit d3497c1

Browse files
author
Jeremiah VALERIE
committed
Fix BC
1 parent a9e8913 commit d3497c1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/EventListener/ErrorLoggerListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,6 @@ public function log(\Throwable $exception, string $errorLevel = LogLevel::ERROR)
6464
$exception->getLine()
6565
);
6666

67-
$this->logger->log($errorLevel, $message, ['exception' => $exception]);
67+
$this->logger->log($errorLevel, $message, ['exception' => $exception, 'throwable' => $exception]);
6868
}
6969
}

tests/EventListener/ErrorLoggerListenerTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function onErrorFormattingDataProvider(): \Generator
7979
[
8080
LogLevel::CRITICAL,
8181
\sprintf('[GraphQL] Exception: Ko![0] (caught throwable) at %s line %s.', __FILE__, $exception->getLine()),
82-
['exception' => $exception],
82+
['exception' => $exception, 'throwable' => $exception],
8383
],
8484
];
8585

@@ -89,7 +89,7 @@ public function onErrorFormattingDataProvider(): \Generator
8989
[
9090
LogLevel::ERROR,
9191
\sprintf('[GraphQL] Exception: Ko![0] (caught throwable) at %s line %s.', __FILE__, $exception->getLine()),
92-
['exception' => $exception],
92+
['exception' => $exception, 'throwable' => $exception],
9393
],
9494
];
9595

@@ -99,7 +99,7 @@ public function onErrorFormattingDataProvider(): \Generator
9999
[
100100
LogLevel::ERROR,
101101
\sprintf('[GraphQL] Exception: Ko![0] (caught throwable) at %s line %s.', __FILE__, $exception->getLine()),
102-
['exception' => $exception],
102+
['exception' => $exception, 'throwable' => $exception],
103103
],
104104
];
105105

@@ -109,7 +109,7 @@ public function onErrorFormattingDataProvider(): \Generator
109109
[
110110
LogLevel::WARNING,
111111
\sprintf('[GraphQL] Exception: Ko![0] (caught throwable) at %s line %s.', __FILE__, $exception->getLine()),
112-
['exception' => $exception],
112+
['exception' => $exception, 'throwable' => $exception],
113113
],
114114
];
115115
}

0 commit comments

Comments
 (0)