-
-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ Expect RunCatching for JS,Native and JVM for proper catch #101
Conversation
result/src/commonMain/kotlin/com/github/kittinunf/result/Factory.kt
Outdated
Show resolved
Hide resolved
package com.github.kittinunf.result | ||
|
||
actual inline fun <V> runCatching(block: () -> V?): Result<V?, Throwable> { | ||
return try { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then we can use the new doTry
function and there's no need for expect actual dance right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am afraid that be impossible because it expects receivers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made PR on top of yours #104
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's go
This would be a huge help for property catching checks on platforms