• Post Reply Bookmark Topic Watch Topic
  • New Topic

Inner Classes  RSS feed

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[size=18] [/size]

Why is there a compilation error when calling process() .
 
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shivam Joshi wrote:
Why is there a compilation error when calling process() .


Hate to point out the obvious, but doesn't the compiler message explain it? You are not handling a checked exception. Or to be more specific, you are not handling a declared exception, which also include checked exceptions.

... and for the followup question... keep in mind that the compiler only works with references here, it doesn't know that the method (for the instance) doesn't throw a checked exception.

Henry
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!