@@ -113,7 +113,9 @@ protected function write(array $record)
113113 'datetime ' => $ record ['datetime ' ]->format ('U ' ),
114114 ]);
115115
116- if (isset ($ context ['exception ' ]) && $ context ['exception ' ] instanceof \Exception) {
116+ if (isset ($ context ['exception ' ])
117+ && ($ context ['exception ' ] instanceof \Exception || $ context ['exception ' ] instanceof \Throwable)
118+ ) {
117119 $ payload ['level ' ] = $ context ['level ' ];
118120 $ exception = $ context ['exception ' ];
119121 unset($ context ['exception ' ]);
@@ -131,11 +133,11 @@ protected function write(array $record)
131133 }
132134
133135 /**
134- * @param \Exception $exception
136+ * @param \Throwable $exception
135137 *
136138 * @return bool
137139 */
138- public function shouldSkip (\ Exception $ exception )
140+ public function shouldSkip ($ exception )
139141 {
140142 // check exception
141143 foreach ($ this ->exclude as $ instance ) {
@@ -172,15 +174,15 @@ public function close()
172174 * @param string $rollbarUser
173175 * @param string $localUser
174176 *
175- * @return bool
177+ * @return null|\Psr\Http\Message\ResponseInterface
176178 */
177179 public function trackBuild ($ environment , $ revision , $ comment = '' , $ rollbarUser = '' , $ localUser = '' )
178180 {
179181 // There is no API in Rollbar SDK for tracking builds
180182 $ config = $ this ->getContainer ()->getParameter (SymfonyRollbarExtension::ALIAS . '.config ' );
181183
182184 if (!$ config ['enable ' ]) {
183- return false ;
185+ return null ;
184186 }
185187
186188 /** @var \SymfonyRollbarBundle\Provider\ApiClient $client */
0 commit comments