Skip to content
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

Merged
merged 4 commits into from
Aug 24, 2021

Conversation

iNoles
Copy link
Collaborator

@iNoles iNoles commented Aug 18, 2021

This would be a huge help for property catching checks on platforms

@iNoles iNoles requested a review from kittinunf August 18, 2021 04:26
@iNoles iNoles self-assigned this Aug 18, 2021
@iNoles iNoles requested review from kittinunf and removed request for kittinunf August 18, 2021 23:41
@iNoles iNoles requested a review from kittinunf August 20, 2021 03:53
package com.github.kittinunf.result

actual inline fun <V> runCatching(block: () -> V?): Result<V?, Throwable> {
return try {
Copy link
Owner

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?

Copy link
Collaborator Author

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.

Copy link
Owner

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

Copy link
Owner

@kittinunf kittinunf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's go

@kittinunf kittinunf changed the title Expect RunCatching for JS,Native and JVM for proper catch ✨ Expect RunCatching for JS,Native and JVM for proper catch Aug 24, 2021
@kittinunf kittinunf merged commit 6464f40 into master Aug 24, 2021
@kittinunf kittinunf deleted the expect_runCatching branch August 24, 2021 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants