[android-components](../../index.md) / [mozilla.components.support.base.ext](../index.md) / [kotlin.Throwable](index.md) / [getStacktraceAsString](./get-stacktrace-as-string.md)

# getStacktraceAsString

`fun `[`Throwable`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)`.getStacktraceAsString(): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/support/base/src/main/java/mozilla/components/support/base/ext/Throwable.kt#L15)

Returns a formatted string of the [Throwable.stackTrace](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/stack-trace.html).

