If I surround while statement in a try/catch statement (see the picture), I've got an warning "while statment cannot complete without throwing an exception".

But if I try to put try/catch statement into while statement's block, I meet the same warning.

Update at 3:16 PM: Reply from JetBrains: "It's not a bug." IDEA IntelliJ inspected that I used a while(true) loop so it can be infinite but it's my intent. So maybe I should change this post's title to "A bug? No, it is an intelligence" ;-)
No comments:
Post a Comment