* Truncate stack trace on an ApplicationFailure to prevent buffer overflow.
(failure: ApplicationFailure)
| 93 | * Truncate stack trace on an ApplicationFailure to prevent buffer overflow. |
| 94 | */ |
| 95 | function truncateStackTrace(failure: ApplicationFailure): void { |
| 96 | if (failure.stack && failure.stack.length > MAX_STACK_TRACE_LENGTH) { |
| 97 | failure.stack = `${failure.stack.slice(0, MAX_STACK_TRACE_LENGTH)}\n[stack truncated]`; |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | /** |
| 102 | * Build SessionMetadata from ActivityInput. |
no outgoing calls
no test coverage detected