getStackTraceString

Extension function to get the stack trace of a Throwable as a string.

Receiver

Throwable The throwable instance.

Return

A string representation of the stack trace.