This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Exception" Watch "Exception" New topic


Jack Lau
Ranch Hand

Joined: Aug 30, 2002
Posts: 168

I am testing a vendor program like the above program, and do not know why exception is throw before "status 3" and after "status 1".
Do someone know why exception will throw between status 1 and status 3? It is a runtime exception.

Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15094

Are we supposed to guess what exception is thrown? Is there any other code besides what you posted here?

Please be as precise as possible when you ask a question. Include the complete code and copy & paste the error message (including stacktrace) into your post. The more precise you are, the quicker and better we can help you to solve the problem.

Right now you're not providing us with enough information and it's impossible to say anything useful about it.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Jaime M. Tovar
Ranch Hand

Joined: Mar 28, 2005
Posts: 133
Maybe there is more than one thread running. For example a server initiates many services asynchronously so they can get exceptions in places where it seems there is no code to execute

She will remember your heart when men are fairy tales in books written by rabbits.<br /> As long as there is duct tape... there is also hope.
I agree. Here's the link:
subject: Exception
It's not a secret anymore!