File tree Expand file tree Collapse file tree
errors/src/commonMain/kotlin/dev/icerock/moko/errors/mappers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ allprojects {
4444project build.gradle
4545``` groovy
4646dependencies {
47- commonMainApi("dev.icerock.moko:errors:0.4 .0")
47+ commonMainApi("dev.icerock.moko:errors:0.5 .0")
4848}
4949```
5050
Original file line number Diff line number Diff line change @@ -167,4 +167,11 @@ object ExceptionMappersStorage {
167167 inline fun <E : Throwable , reified T : Any > throwableMapper (): (e: E ) -> T {
168168 return throwableMapper(T ::class )
169169 }
170+
171+ /* *
172+ * Factory method that allows getting exception description
173+ */
174+ inline fun <reified E : Throwable , reified T : Any > E.mapThrowable (): T {
175+ return ExceptionMappersStorage .throwableMapper<E , T >(T ::class )(this )
176+ }
170177}
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ androidCoreTestingVersion = "2.1.0"
77coroutinesVersion = " 1.5.0-native-mt"
88mokoMvvmVersion = " 0.11.0"
99mokoResourcesVersion = " 0.16.0"
10- mokoErrorsVersion = " 0.4 .0"
10+ mokoErrorsVersion = " 0.5 .0"
1111
1212[libraries ]
1313appCompat = { module = " androidx.appcompat:appcompat" , version.ref = " androidAppCompatVersion" }
You can’t perform that action at this time.
0 commit comments