This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

throw Exception question

 
Yan Bai
Ranch Hand
Posts: 125
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Got compile error at line1:
Unreported Exception
Compare to this code:

compile ok.
Why?
 
Alfred Kemety
Ranch Hand
Posts: 279
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Compiler check only on Checked Exceptions and not non-checked exceptions Exception exception is a checked exception. All run-time exceptions - RuntimeException and all its subclasses - are non-checked exceptions, so the compiler doesn't check on them during compilation.
HTH
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic