* Processes the event and logs an error in case of rejection * @param event * @param hint * @param scope
(
event: Event,
hint: EventHint = {},
currentScope = getCurrentScope(),
isolationScope = getIsolationScope(),
)
| 1380 | * @param scope |
| 1381 | */ |
| 1382 | protected _captureEvent( |
| 1383 | event: Event, |
| 1384 | hint: EventHint = {}, |
| 1385 | currentScope = getCurrentScope(), |
| 1386 | isolationScope = getIsolationScope(), |
| 1387 | ): PromiseLike<string | undefined> { |
| 1388 | if (DEBUG_BUILD && isErrorEvent(event)) { |
| 1389 | debug.log(`Captured error event \`${getPossibleEventMessages(event)[0] || '<unknown>'}\``); |
| 1390 | } |
| 1391 | |
| 1392 | return this._processEvent(event, hint, currentScope, isolationScope).then( |
| 1393 | finalEvent => { |
| 1394 | return finalEvent.event_id; |
| 1395 | }, |
| 1396 | reason => { |
| 1397 | if (DEBUG_BUILD) { |
| 1398 | if (_isDoNotSendEventError(reason)) { |
| 1399 | debug.log(reason.message); |
| 1400 | } else if (_isInternalError(reason)) { |
| 1401 | debug.warn(reason.message); |
| 1402 | } else { |
| 1403 | debug.warn(reason); |
| 1404 | } |
| 1405 | } |
| 1406 | return undefined; |
| 1407 | }, |
| 1408 | ); |
| 1409 | } |
| 1410 | |
| 1411 | /** |
| 1412 | * Processes an event (either error or message) and sends it to Sentry. |
nothing calls this directly
no test coverage detected