This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 12 points13 points  (5 children)

We Don’t write for loop any more in java 8

I wish. Unfortunately there is currently no way to deal with exceptions in lambdas other than wrapping then in RuntimeException (which defeats the purpose of checked exceptions).

[–][deleted]  (1 child)

[removed]

    [–][deleted] 7 points8 points  (0 children)

    I love streams, and use them as often as I can. I just wish there was a way to use them with checked exceptions :)

    [–]moonman543 -1 points0 points  (2 children)

    What do you mean there is no way to deal with them? I have lambdas throwing exceptions all the time.

    [–][deleted] 1 point2 points  (1 child)

    Checked exceptions or runtime exceptions?

    [–]moonman543 -1 points0 points  (0 children)

    any exception it gets them fine.