• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

about nested try catch

 
Chang Tzu-yu
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I don't understand about nested try catch

When has error, It didn't continue Loop, It run finally!!!
I don't know why it run like this???
Please tell me, thanks!!!
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15219
36
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The code you posted is not real Java code, so that makes it a little bit harder.

If you want to use "continue", then you must do that inside the code block of the loop you are programming. You can't put "continue" somewhere else outside the block - that will not compile.

Try putting the try-catch block inside the block of the loop:
 
Chang Tzu-yu
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jesper,
Thanks for your reply
I'll try it...
Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic