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

Failure in try! block #32

Open
angdev opened this issue Jun 22, 2016 · 3 comments
Open

Failure in try! block #32

angdev opened this issue Jun 22, 2016 · 3 comments

Comments

@angdev
Copy link

angdev commented Jun 22, 2016

Hi. I have a question about behavior of try!.

try! { 1 } # => Success(1)
try! { Success(1) } # => Success(1)
try! { Failure(1) } # => Success(Failure(1))

Is this behavior intended?
Thanks.

@pzol
Copy link
Owner

pzol commented Jun 22, 2016

No. Shouldn't be like that

Piotr

On 22 Jun 2016 07:49 +0200, Hong [email protected], wrote:

Hi. I have a question about behavior oftry!.

try! {1}# =>Success(1)try! {Success(1) }# =>Success(1)try! {Failure(1) }#=>Success(Failure(1))

Is this behavior intended?
Thanks.


You are receiving this because you are subscribed to this thread.
Reply to this email directly,view it on GitHub(#32), ormute the thread(https://github.com/notifications/unsubscribe/AAI2z9MzH8uwDpOWm3oJ2Ed1BU0tFpZoks5qOMzWgaJpZM4I7bXP).

@angdev
Copy link
Author

angdev commented Jun 22, 2016

Then, below is correct behavior?

try! { 1 } # => Success(1)
try! { Success(1) } # => Success(1)
try! { Failure(1) } # => Failure(1)

@pzol
Copy link
Owner

pzol commented Jun 22, 2016

Yes

Piotr

On 22 Jun 2016 18:02 +0200, Hong [email protected], wrote:

Then, below is correct behavior?

try! {1}# =>Success(1)try! {Success(1) }# =>Success(1)try! {Failure(1) }# =>Failure(1)


You are receiving this because you commented.
Reply to this email directly,view it on GitHub(#32 (comment)), ormute the thread(https://github.com/notifications/unsubscribe/AAI2z8vUQ_tlWrq2ZzOOx9BBx16gjYgtks5qOVxwgaJpZM4I7bXP).

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

No branches or pull requests

2 participants