( stackParser: StackParser, message: ParameterizedString, syntheticException?: Error, attachStacktrace?: boolean, )
| 347 | } |
| 348 | |
| 349 | function eventFromString( |
| 350 | stackParser: StackParser, |
| 351 | message: ParameterizedString, |
| 352 | syntheticException?: Error, |
| 353 | attachStacktrace?: boolean, |
| 354 | ): Event { |
| 355 | const event: Event = {}; |
| 356 | |
| 357 | if (attachStacktrace && syntheticException) { |
| 358 | const frames = parseStackFrames(stackParser, syntheticException); |
| 359 | if (frames.length) { |
| 360 | event.exception = { |
| 361 | values: [{ value: message, stacktrace: { frames } }], |
| 362 | }; |
| 363 | } |
| 364 | addExceptionMechanism(event, { synthetic: true }); |
| 365 | } |
| 366 | |
| 367 | if (isParameterizedString(message)) { |
| 368 | const { __sentry_template_string__, __sentry_template_values__ } = message; |
| 369 | |
| 370 | event.logentry = { |
| 371 | message: __sentry_template_string__, |
| 372 | params: __sentry_template_values__, |
| 373 | }; |
| 374 | return event; |
| 375 | } |
| 376 | |
| 377 | event.message = message; |
| 378 | return event; |
| 379 | } |
| 380 | |
| 381 | function getNonErrorObjectExceptionValue( |
| 382 | exception: Record<string, unknown>, |
no test coverage detected