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

I create an exception class but i cant understand what am i doing  RSS feed

 
ekte spiriopoulos
Ranch Hand
Posts: 217
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I cant understand what it does this code.Also, i have a main that i throw this exception .Could you explain me what it does RuntimeException,super s and etc?

 
Henry Wong
author
Sheriff
Posts: 23283
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ekte spiriopoulos wrote:I cant understand what it does this code.Also, i have a main that i throw this exception .Could you explain me what it does RuntimeException,super s and etc?


This question is kinda general isn't it? Can you be more specific? Meaning can you tell us your exact confusion? ... because if your confusion is everything, then the best option is probably to start from the beginning regarding exceptions, using a tutorial.

Henry
 
ekte spiriopoulos
Ranch Hand
Posts: 217
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Henry Wong wrote:
ekte spiriopoulos wrote:I cant understand what it does this code.Also, i have a main that i throw this exception .Could you explain me what it does RuntimeException,super s and etc?


This question is kinda general isn't it? Can you be more specific? Meaning can you tell us your exact confusion? ... because if your confusion is everything, then the best option is probably to start from the beginning regarding exceptions, using a tutorial.

Henry
 
Henry Wong
author
Sheriff
Posts: 23283
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ekte spiriopoulos wrote:


That line calls the constructor of the superclass that takes a single string parameter. As for what it is, the RuntimeException class uses it as the error message.

Henry
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!