• Post Reply Bookmark Topic Watch Topic
  • New Topic

uncaughtException in Swing app  RSS feed

 
Venkat Kommareddy
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are getting following message in console

"In uncaughtException

java.lang.ArrayIndexOutOfBoundsException:"


how to avoid this showing on console and catch it.

Thanks
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

From the API Docs
Thrown to indicate that an array has been accessed with an illegal index. The index is either negative or greater than or equal to the size of the array.

Some part of your code does exactly this.
Have you looked at the stack trace? It will show which line of your code caused this exception to be thrown

how to avoid this showing on console and catch it.

You should be fixing the code to solve the problem, instead of considering catching it.

 
Campbell Ritchie
Marshal
Posts: 55761
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Agree. An out of bounds Exception shows an error in the code.

And welcome to the Ranch
 
Rob Spoor
Sheriff
Posts: 21092
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This error may be caused by a synchronization error. I suggest you read Concurrency in Swing.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!