Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what is error?

 
arden liu
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
any statement that may throw an Excetpion must be enclosed in a try bolck.
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
any statement that may throw an Excetpion must be enclosed in a try bolck.



It should be any statement that may throw checked (or non-runtime) excetpion must be enclosed in a try-catch block.

Nick
 
arden liu
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But in that sentence, it is an Exception, I think it is one instance of Exception, such as new Exception().
maybe the statement should change Exception into exception, it is very more clear.
Thanks anyway.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic