Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to retrieve the object that caused the exception  RSS feed

 
fedai gandjaliyev
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!
I have three JTextFields and each of them can throw an (different) exception and I need to display a message depending on the JTextField!
Is there a way of getting the source that caused the exception?

Thanks a lot!
 
Shaan Shar
Ranch Hand
Posts: 1249
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by fedai gandjaliyev:
Hello!
I have three JTextFields and each of them can throw an (different) exception and I need to display a message depending on the JTextField!
Is there a way of getting the source that caused the exception?

Thanks a lot!


I didn't get you exactly what you really want to know.
If you want to know that where exception is occured you can use printStackTrace() method of Exception class.

Come up with clearly stated question....
 
fedai gandjaliyev
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I made it up!
Sorry!
Thanks!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!