File tree Expand file tree Collapse file tree 2 files changed +3
-11
lines changed Expand file tree Collapse file tree 2 files changed +3
-11
lines changed Original file line number Diff line number Diff line change 22
33## Unreleased
44
5+ - Fix missing scope information on unhandled exceptions (#611 )
6+
57## 3.1.0
68
79- Unhandled exceptions are now correctly marked as ` handled: false ` and displayed as such on the issues list and detail page (#608 )
Original file line number Diff line number Diff line change @@ -177,20 +177,10 @@ public static function sentryBaggageMeta(): string
177177 */
178178 public static function captureUnhandledException (Throwable $ throwable ): ?EventId
179179 {
180- $ client = SentrySdk::getCurrentHub ()->getClient ();
181-
182- // When Sentry is not configured, because for example no DSN
183- // is set the client can be null. If that is the case we cannot
184- // transmit the event so, exit early to prevent doing useless work
185- if ($ client === null ) {
186- return null ;
187- }
188-
189180 $ hint = EventHint::fromArray ([
190- 'exception ' => $ throwable ,
191181 'mechanism ' => new ExceptionMechanism (ExceptionMechanism::TYPE_GENERIC , false ),
192182 ]);
193183
194- return $ client -> captureEvent (Event:: createEvent () , $ hint );
184+ return SentrySdk:: getCurrentHub ()-> captureException ( $ throwable , $ hint );
195185 }
196186}
You can’t perform that action at this time.
0 commit comments