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

understanding error messages  RSS feed

 
Karen Nelson
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an out-of-bounds exception using an ArrayList, and I have the feeling that if I understood how to read the error message I could fix the problem more easily. Part of the list of calls reads

at java.util.ArrayList.get(Unknown Source)

Does 'unknown source' refer to a parameter, to the object on which I'm calling "get", or to the file that the class is in? It seems like it must be the last, since what usually goes in the parantheses is a file and line number. But if the JVM (?) understands ArrayList, why does it not also understand ArrayList.get(num)?

Thanks in advance! Karen.

ps now I have figured out that the error was because I tried to get item 1 from an array of length 1 -- C programming habits... but I still don't understand where the "Unknown Source" comes from.
[ August 26, 2005: Message edited by: Karen Nelson ]
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it's just telling you the debug information about the class, such as line numbers and the actual source code, were not available to the runtime. If they had been available there would have been a little more info in the error.
 
Marilyn de Queiroz
Sheriff
Posts: 9080
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am unable to duplicate your error.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!