This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Exception  RSS feed

 
naresh babu
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I had a question in exception:
public class exception1 extends Exception{}

public class exception2 extends exception1{}
I want client to catch only exception2, but
not exception1.Any ideas?

Thanks
 
Roy Ben Ami
Ranch Hand
Posts: 732
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
catch(Exception2 e){} ???
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!