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 2
2
3
3
## Unreleased
4
4
5
+ - Fix missing scope information on unhandled exceptions (#611 )
6
+
5
7
## 3.1.0
6
8
7
9
- 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
177
177
*/
178
178
public static function captureUnhandledException (Throwable $ throwable ): ?EventId
179
179
{
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
-
189
180
$ hint = EventHint::fromArray ([
190
- 'exception ' => $ throwable ,
191
181
'mechanism ' => new ExceptionMechanism (ExceptionMechanism::TYPE_GENERIC , false ),
192
182
]);
193
183
194
- return $ client -> captureEvent (Event:: createEvent () , $ hint );
184
+ return SentrySdk:: getCurrentHub ()-> captureException ( $ throwable , $ hint );
195
185
}
196
186
}
You can’t perform that action at this time.
0 commit comments